Newsgroups: comp.lang.pascal
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!fauern!NewsServ!tritsche
From: tritsche@Informatik.TU-Muenchen.DE (Stefan Tritscher)
Subject: Re: "Dots will echo: " for passwords...
Message-ID: <1991Apr12.181009.26488@Informatik.TU-Muenchen.DE>
Sender: news@Informatik.TU-Muenchen.DE
Organization: Technische Universitaet Muenchen, Germany
References: <40822@netnews.upenn.edu>
Distribution: na
Date: Fri, 12 Apr 1991 18:10:09 GMT
Lines: 26

In article <40822@netnews.upenn.edu> garay@hyper.lap.upenn.edu (John Garay) writes:
>
>I'm interested in a procedure in TP which will echo dots to the screen instead
>of the actual keys pressed.  In other words, one of the ol'
>	'Please type in password (dots will echo):'
>types of things.  The form I have now (w/ the password broadcasted on the
>screen is: 	clrscr;
>		writeln ('Please Type Password:');
>		readln (password);
>
It is generally no good idea to print dots for every character of the
password, if you want the secret password to stay secret. Dots would be
helpful for an intruder, because he would know the length of the password.
Knowing the length of a passwords makes it much easier to break the
password, because the number of possible passwords is reduced.

My suggestion: don't echo anything!

It's a long time ago since I used TP, but I think in TP 3.x you can read
single characters without echo with: read(kbd,c) ( I don't remember if this
works with complete strings - may be that you have to write your own string
input procedure).

Good luck,

	Stefan
