-
password encryption
OK I am trying to make a program to type in a password... however when the password is typed in i do not want the user to see what they are typeing... I dont want the little ****'s either i just want the input field to remain blank.. is there anyway to do this? please help me out.. my email is [email protected]
-
This is actually quite difficult. It involves making your own function to get input one character at a time and you also have to consider things like backspaces, the arrow keys, and the del key.
Why should we email you? There's an option so that if anyone replies to your post you get notified by email.
-
I'm assuming you're writing a console app.
#include <conio.h>
in that header are some useful functions for what you want to do.
getch() reads a key pressed. you can use that to intercept a keypress and write whatever character you want in its place (using putch()).
Look thru the header at the functions. It's not too difficult.
...
char ch = getch();
passStr[index++] = ch;
putch('*');
...
HTH