Password mask 
Author Message
 Password mask

Hello,

Could anyone give me a little hand with a problem I have

I need something to totally mask the input of a string (i.e. a password,
without anything appearing on the screen (the cursor just stays in one
place).

Can anyone help?

Thanks

G. Kirkby



Wed, 18 Jun 1902 08:00:00 GMT  
 Password mask
Graeme Kirkby schrieb:

Quote:
> Hello,

> Could anyone give me a little hand with a problem I have

> I need something to totally mask the input of a string (i.e. a password,
> without anything appearing on the screen (the cursor just stays in one
> place).

> Can anyone help?

> Thanks

> G. Kirkby

uses crt;
var
  ch : char;
  password : string;
begin
  ch := readkey;
  while ch <> #13 do
  begin
    password := password + ch;
    ch := readkey
  end
end.


Wed, 18 Jun 1902 08:00:00 GMT  
 Password mask
Thanks very much,

G. Kirkby

Quote:

>uses crt;
>var
>  ch : char;
>  password : string;
>begin
>  ch := readkey;
>  while ch <> #13 do
>  begin
>    password := password + ch;
>    ch := readkey
>  end
>end.



Wed, 18 Jun 1902 08:00:00 GMT  
 Password mask
   Note that the code below has several problems which could cause
difficulty:
  1. It doesn't check for or process special/Extended keystrokes (cursor
keys, function keys, etc.), and such data won't be suitable in passwords.
  2. This code fail to limit the number of characters entered or
processed - I doubt anyone wants a program which garbles its own password
processing when too much data is entered at the prompt.
   Therefore, while this code shows the _framework_ of reading keyboard
data without displaying it to the screen, I feel it needs considerable
work to make it really useful...
Quote:
> >uses crt;
> >var
> >  ch : char;
> >  password : string;
> >begin
> >  ch := readkey;
> >  while ch <> #13 do
> >  begin
> >    password := password + ch;
> >    ch := readkey
> >  end
> >end.



Wed, 18 Jun 1902 08:00:00 GMT  
 Password mask
Mike Copeland schrieb:

Quote:
>    Note that the code below has several problems which could cause
> difficulty:
>   1. It doesn't check for or process special/Extended keystrokes (cursor
> keys, function keys, etc.), and such data won't be suitable in passwords.
>   2. This code fail to limit the number of characters entered or
> processed - I doubt anyone wants a program which garbles its own password
> processing when too much data is entered at the prompt.
>    Therefore, while this code shows the _framework_ of reading keyboard
> data without displaying it to the screen, I feel it needs considerable
> work to make it really useful...

It was intended to be a framework. It demonstrates very well how such a
password routine could be achieved. Of course, it needs amendments, which
should be added by the programmer.


Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. How can I use a mask in a Tstringgrid

2. Masks.pas ?

3. DBEdit Components and Edit Masks

4. Need a god DB Masked Edit component

5. PAradox tables and field masks.

6. D4: Masking filelds in DBGrid

7. Help, Date Masking Format

8. Masks, DBEdit, dates and NULL values

9. Input masks

10. Masks and DELPHI

11. DBGrid and DBEdit with Masks

12. BDGrid lookup and masks question

 

 
Powered by phpBB® Forum Software