diff options
Diffstat (limited to 'src/readpassphrase.h')
-rw-r--r-- | src/readpassphrase.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/readpassphrase.h b/src/readpassphrase.h new file mode 100644 index 0000000..5fc0bc2 --- /dev/null +++ b/src/readpassphrase.h @@ -0,0 +1,23 @@ +#ifndef READPASSPHRASE_H +#define READPASSPHRASE_H + +#ifndef _PATH_TTY +# define _PATH_TTY "/dev/tty" +#endif + +#define RPP_ECHO_OFF 0x00 /* Turn off echo (default). */ +#define RPP_ECHO_ON 0x01 /* Leave echo on. */ +#define RPP_REQUIRE_TTY 0x02 /* Fail if there is no tty. */ +#define RPP_FORCELOWER 0x04 /* Force input to lower case. */ +#define RPP_FORCEUPPER 0x08 /* Force input to upper case. */ +#define RPP_SEVENBIT 0x10 /* Strip the high bit from input. */ +#define RPP_STDIN 0x20 /* Read from stdin, not /dev/tty */ + +#include <stddef.h> + +char *readpassphrase(const char *prompt, char *outBuf, size_t outBufLen, int flags); + +#endif /* READPASSPHRASE_H */ + + + |