xref: /openbsd/include/readpassphrase.h (revision 4fb48fe4)
1*4fb48fe4Smillert /*	$OpenBSD: readpassphrase.h,v 1.3 2002/06/28 12:32:22 millert Exp $	*/
2a6b38e9eSmillert 
3a6b38e9eSmillert /*
4a6b38e9eSmillert  * Copyright (c) 2000 Todd C. Miller <Todd.Miller@courtesan.com>
5a6b38e9eSmillert  * All rights reserved.
6a6b38e9eSmillert  *
7a6b38e9eSmillert  * Redistribution and use in source and binary forms, with or without
8a6b38e9eSmillert  * modification, are permitted provided that the following conditions
9a6b38e9eSmillert  * are met:
10a6b38e9eSmillert  * 1. Redistributions of source code must retain the above copyright
11a6b38e9eSmillert  *    notice, this list of conditions and the following disclaimer.
12a6b38e9eSmillert  * 2. Redistributions in binary form must reproduce the above copyright
13a6b38e9eSmillert  *    notice, this list of conditions and the following disclaimer in the
14a6b38e9eSmillert  *    documentation and/or other materials provided with the distribution.
15a6b38e9eSmillert  * 3. The name of the author may not be used to endorse or promote products
16a6b38e9eSmillert  *    derived from this software without specific prior written permission.
17a6b38e9eSmillert  *
18a6b38e9eSmillert  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
19a6b38e9eSmillert  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
20a6b38e9eSmillert  * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
21a6b38e9eSmillert  * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22a6b38e9eSmillert  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23a6b38e9eSmillert  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
24a6b38e9eSmillert  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25a6b38e9eSmillert  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26a6b38e9eSmillert  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27a6b38e9eSmillert  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28a6b38e9eSmillert  */
29a6b38e9eSmillert 
30a6b38e9eSmillert #ifndef _READPASSPHRASE_H_
31a6b38e9eSmillert #define _READPASSPHRASE_H_
32a6b38e9eSmillert 
33a6b38e9eSmillert #define RPP_ECHO_OFF    0x00		/* Turn off echo (default). */
34a6b38e9eSmillert #define RPP_ECHO_ON     0x01		/* Leave echo on. */
35a6b38e9eSmillert #define RPP_REQUIRE_TTY 0x02		/* Fail if there is no tty. */
36a6b38e9eSmillert #define RPP_FORCELOWER  0x04		/* Force input to lower case. */
37a6b38e9eSmillert #define RPP_FORCEUPPER  0x08		/* Force input to upper case. */
38a6b38e9eSmillert #define RPP_SEVENBIT    0x10		/* Strip the high bit from input. */
39*4fb48fe4Smillert #define RPP_STDIN       0x20		/* Read from stdin, not /dev/tty */
40a6b38e9eSmillert 
41a6b38e9eSmillert #include <sys/cdefs.h>
42a6b38e9eSmillert 
43a6b38e9eSmillert __BEGIN_DECLS
44c72b5b24Smillert char * readpassphrase(const char *, char *, size_t, int);
45a6b38e9eSmillert __END_DECLS
46a6b38e9eSmillert 
47a6b38e9eSmillert #endif /* !_READPASSPHRASE_H_ */
48