diff options
author | ben | 2019-05-27 21:40:41 +0200 |
---|---|---|
committer | ben | 2019-05-27 21:40:41 +0200 |
commit | accdbc780617a4f4b30790ffb25ab1d26652c315 (patch) | |
tree | 2633c1246a35e7242bfc693959830ae63b641301 /src/readpassphrase.h | |
download | inexact-accdbc780617a4f4b30790ffb25ab1d26652c315.tar.gz inexact-accdbc780617a4f4b30790ffb25ab1d26652c315.tar.bz2 inexact-accdbc780617a4f4b30790ffb25ab1d26652c315.tar.xz |
First public release
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 */ + + + |