29 #include "getpasswd.h"
34 string getpasswd(
string prompt)
42 HANDLE hIn=GetStdHandle(STD_INPUT_HANDLE);
44 GetConsoleMode( hIn, &con_mode );
45 SetConsoleMode( hIn, con_mode & ~(ENABLE_ECHO_INPUT | ENABLE_LINE_INPUT) );
49 SetConsoleMode( hIn, con_mode );
60 string getpasswd(
string prompt)
67 tcgetattr(STDIN_FILENO, &tty);
71 tcsetattr(STDIN_FILENO, TCSANOW, &tty);
76 tcsetattr(STDIN_FILENO, TCSANOW, &tty);