Masking Input with Asterisks 
Author Message
 Masking Input with Asterisks

Does anyone have an snippets of code or links to how-to's so I can see how
to mask input through a standard iostream to hide passwords? I basically
want to either hide the password as the user types like with "net use" in NT
or display it with asterisks like logging into a wu-ftp daemon.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Heath Stewart, NT Systems Administrator
Iowa State University, ECSS

http://www.*-*-*.com/



Sun, 30 Dec 2001 03:00:00 GMT  
 Masking Input with Asterisks
Send a EM_SETPASSWORDCHAR

Heath Stewart a crit:

Quote:
> Does anyone have an snippets of code or links to how-to's so I can see how
> to mask input through a standard iostream to hide passwords? I basically
> want to either hide the password as the user types like with "net use" in NT
> or display it with asterisks like logging into a wu-ftp daemon.

> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Heath Stewart, NT Systems Administrator
> Iowa State University, ECSS

> http://www.stewart.dorm.org/



Sun, 30 Dec 2001 03:00:00 GMT  
 Masking Input with Asterisks



Quote:
> Send a EM_SETPASSWORDCHAR

I don't think that will work with iostreams.

Quote:

> Heath Stewart a crit:

> > Does anyone have an snippets of code or links to how-to's so I can see
how
> > to mask input through a standard iostream to hide passwords? I basically
> > want to either hide the password as the user types like with "net use"
in NT
> > or display it with asterisks like logging into a wu-ftp daemon.

> > --
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Heath Stewart, NT Systems Administrator
> > Iowa State University, ECSS

> > http://www.stewart.dorm.org/



Mon, 31 Dec 2001 03:00:00 GMT  
 Masking Input with Asterisks
A very retrograde measure would be to use getch() in <conio.h>!  This
harkens back to DOS days and before, and retrieves keystrokes (though
admittedly not using iostreams0 and not displaying them.


Quote:



>> Send a EM_SETPASSWORDCHAR

>I don't think that will work with iostreams.

>> Heath Stewart a crit:

>> > Does anyone have an snippets of code or links to how-to's so I
can see
>how
>> > to mask input through a standard iostream to hide passwords? I
basically
>> > want to either hide the password as the user types like with "net
use"
>in NT
>> > or display it with asterisks like logging into a wu-ftp daemon.

>> > --
>> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> > Heath Stewart, NT Systems Administrator
>> > Iowa State University, ECSS

>> > http://www.stewart.dorm.org/



Wed, 02 Jan 2002 03:00:00 GMT  
 Masking Input with Asterisks
I had understood that Heath wanted to simulate a password login with
asterisks...

Olaf van der Spek a crit :

Quote:


> > Send a EM_SETPASSWORDCHAR

> I don't think that will work with iostreams.

> > Heath Stewart a crit:

> > > Does anyone have an snippets of code or links to how-to's so I can see
> how
> > > to mask input through a standard iostream to hide passwords? I basically
> > > want to either hide the password as the user types like with "net use"
> in NT
> > > or display it with asterisks like logging into a wu-ftp daemon.

> > > --
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > Heath Stewart, NT Systems Administrator
> > > Iowa State University, ECSS

> > > http://www.stewart.dorm.org/



Fri, 04 Jan 2002 03:00:00 GMT  
 Masking Input with Asterisks

Quote:
> I had understood that Heath wanted to simulate a password login with
> asterisks...

Read:

Quote:
> > Does anyone have an snippets of code or links to how-to's so I can see
> > how to mask input through a standard iostream to hide passwords?

Through a standard iostream, not in an edit control.

Sorry, original poster, I don't have a pre-canned solution.  You need more
direct control than iostreams offer, I believe, because they're line
buffered, but my experience with iostreams is minimal.  Check around in the
docs and see if you can turn on character-by-character mode, rather than
line-by-line mode, and then see if you can turn the auto-echo off.

I have my doubts.  :-)  NET.EXE is a console-based application, and likely
directly uses the Win32 console APIs.

Best regards,
Brad

--
Brad Wilson, Objectivist philosopher in training  (http://www.aynrand.org/)
Try my CD player for Windows 95/98/NT/2K  (http://www.quality.nu/cdplayer/)

"I can learn to compromise anything but my desires...
 I can learn to persist with anything but aiming low...
 I can close my eyes to anything but injustice..."
                    - Rush, "Resist", Test for Echo



Sat, 05 Jan 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Masking Input with Asterisks

2. replacing input keystrokes with asterisk

3. Creating Input Masks

4. Need to mask the input?

5. Input Masks

6. input mask source code

7. Masking input

8. HELP - ActiveX Masked Edit Control does NOT accept mask

9. Asterisk Notation in C++?

10. Displaying Passwords as Asterisks--Help!

11. C asterisk question.

12. printf and variable length string format (asterisk)

 

 
Powered by phpBB® Forum Software