Hi, I’m writing a program and I need to read some password, so I use
getpass, but later reading the man page of getpass I see “This function
is obsolete. Do not use it.”, so, what function can I use instead of
getpass?
VampirD
Microsoft Windows is like air conditioning
Stops working when you open a window.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/
Microsoft Windows is like air conditioning
Stops working when you open a window.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/
The idea is to implement a POSIX equivalent of getch(). This can be easily done by switching off the terminal buffering and then, using the getchar() or other functions. (Have a look at the code link suggested by Monex).