TIP: Click on subject to list as thread! ANSI
echo: foxpro
to: DAVID POWELL
from: RANDY W FOGG
date: 1997-02-06 08:52:00
subject: HIDING PASSWORDS AND

 -=> Quoting David Powell to Den Barnes <=-
 DP> Hi Den:
 DP> Actually, my response to this is the same as to Gerry.
 DP> Identical colors for foreground and background hide the characters,
 DP> but do a disservice to the user.  It is difficult to tell if you missed
 DP> a keystroke in your longer-length passwords.  I prefer the echoing
 DP> asterisks or some other place-marking character.
 DP> David in Dallas.
 Hello David,
 I saw this thread and wrote a quick down and dirty routine that
 should get him started. It has no error checking (like length or
 backspacing) but should be a core start for anyone interested.
 Maybe I'll add the 'fluff' later.
* Function...: GetPass
* Version....: 1.0
* Author.....: Randy W Fogg
* Date.......: February 6, 1997
* Notice.....: Copyright (c)1997 BDK Technologies
*              All Rights Reserved.
* Compiler...: FoxPro 2.6 DOS/WIN
* Abstract...: Echos *'s in place of password at
*              supplied coordinates. No error checking at all.
*              A very rudimentary start. Modify at will.
* Call With..: GetPass(NumericRow, NumericColumn)
* Example....: PassWord = GetPass(10,10)
* Returns....: Character String
* Calls......: Inkey()
* Changes....:
***************************************************
**-- Get Row and Column Parameters
Parameters lnRow,lnCol
private all
**-- Save and Set Talk Off to avoid 'echoing'
lcOldTalk = set("Talk")
set talk off
**-- Initialize variables used
lnKeyPress = 1
lcPassword = ''
**-- Do the loop until ESCAPE or RETURN is pressed
do while lnKeyPress  27 AND lnKeyPress  13
   lnKeyPress = inkey()
   if lnKeyPress  0 AND ;
      lnKeyPress  27 AND ;
      lnKeyPress  13
      
      **-- If we have a character, say '*'
      @ lnRow,lnCol say '*'
      
      **-- Increment Column for next character
      lnCol = lnCol+1
  
      **-- Append keystroke to PassWord string    
      lcPassword = lcPassword+chr(lnKeyPress)
   endif   
enddo
**-- Clean up and return the password
set talk &lcOldTalk
return (lcPassword)
************************************************************
Randy W Fogg
BDK Technologies
Sacramento, CA
www.bdktech.com
randy@bdktech.com
... Take my advice, I don't use it anyway.
___ Blue Wave/QWK v2.12
--- FLAME v1.1
---------------
* Origin: 24th Street Exchange * A BBS Since 1983 * 916.448.2483 (1:203/52)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.