From accdbc780617a4f4b30790ffb25ab1d26652c315 Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 27 May 2019 21:40:41 +0200 Subject: First public release --- src/readpassphrase.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/readpassphrase.h (limited to 'src/readpassphrase.h') 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 + +char *readpassphrase(const char *prompt, char *outBuf, size_t outBufLen, int flags); + +#endif /* READPASSPHRASE_H */ + + + -- cgit v1.2.3