1215236Sdelphij/*	$OpenBSD: readpassphrase.h,v 1.5 2003/06/17 21:56:23 millert Exp $	*/
286669Sgreen/*	$FreeBSD$	*/
386669Sgreen
486669Sgreen/*
5215236Sdelphij * Copyright (c) 2000, 2002 Todd C. Miller <Todd.Miller@courtesan.com>
686669Sgreen *
7215236Sdelphij * Permission to use, copy, modify, and distribute this software for any
8215236Sdelphij * purpose with or without fee is hereby granted, provided that the above
9215236Sdelphij * copyright notice and this permission notice appear in all copies.
1086669Sgreen *
11215236Sdelphij * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12215236Sdelphij * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13215236Sdelphij * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14215236Sdelphij * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15215236Sdelphij * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16215236Sdelphij * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17215236Sdelphij * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18215236Sdelphij *
19215236Sdelphij * Sponsored in part by the Defense Advanced Research Projects
20215236Sdelphij * Agency (DARPA) and Air Force Research Laboratory, Air Force
21215236Sdelphij * Materiel Command, USAF, under agreement number F39502-99-1-0512.
2286669Sgreen */
2386669Sgreen
2486669Sgreen#ifndef _READPASSPHRASE_H_
2586669Sgreen#define _READPASSPHRASE_H_
2686669Sgreen
2786669Sgreen#define RPP_ECHO_OFF    0x00		/* Turn off echo (default). */
2886669Sgreen#define RPP_ECHO_ON     0x01		/* Leave echo on. */
2986669Sgreen#define RPP_REQUIRE_TTY 0x02		/* Fail if there is no tty. */
3086669Sgreen#define RPP_FORCELOWER  0x04		/* Force input to lower case. */
3186669Sgreen#define RPP_FORCEUPPER  0x08		/* Force input to upper case. */
3286669Sgreen#define RPP_SEVENBIT    0x10		/* Strip the high bit from input. */
33215236Sdelphij#define RPP_STDIN       0x20		/* Read from stdin, not /dev/tty */
3486669Sgreen
3586669Sgreen#include <sys/cdefs.h>
36178863Sscf#include <sys/_types.h>
3786669Sgreen
38178863Sscf#ifndef _SIZE_T_DECLARED
39178863Sscftypedef	__size_t	size_t;
40178863Sscf#define	_SIZE_T_DECLARED
41178863Sscf#endif
42178863Sscf
4386669Sgreen__BEGIN_DECLS
4491911Sgreenchar * readpassphrase(const char *, char *, size_t, int);
4586669Sgreen__END_DECLS
4686669Sgreen
4786669Sgreen#endif /* !_READPASSPHRASE_H_ */
48