]>
Commit | Line | Data |
---|---|---|
0c1f3509 MG |
1 | #ifndef _READPASS_H_ |
2 | #define _READPASS_H_ | |
3 | ||
4 | /* Avoid namespace collisions with other "readpass" functions. */ | |
5 | #ifdef readpass | |
6 | #undef readpass | |
7 | #endif | |
8 | #define readpass libcperciva_readpass | |
9 | ||
10 | /** | |
11 | * readpass(passwd, prompt, confirmprompt, devtty) | |
12 | * If ${devtty} is non-zero, read a password from /dev/tty if possible; if | |
13 | * not, read from stdin. If reading from a tty (either /dev/tty or stdin), | |
14 | * disable echo and prompt the user by printing ${prompt} to stderr. If | |
15 | * ${confirmprompt} is non-NULL, read a second password (prompting if a | |
16 | * terminal is being used) and repeat until the user enters the same password | |
17 | * twice. Return the password as a malloced NUL-terminated string via | |
18 | * ${passwd}. | |
19 | */ | |
20 | int readpass(char **, const char *, const char *, int); | |
21 | ||
22 | #endif /* !_READPASS_H_ */ |