readpassphrase.h revision 178863
191911Sgreen/*	$OpenBSD: /usr/local/www/cvsroot/OpenBSD/src/include/readpassphrase.h,v 1.2 2002/02/16 21:27:17 millert Exp $	*/
286669Sgreen/*	$FreeBSD: head/include/readpassphrase.h 178863 2008-05-08 23:57:29Z scf $	*/
386669Sgreen
486669Sgreen/*
586669Sgreen * Copyright (c) 2000 Todd C. Miller <Todd.Miller@courtesan.com>
686669Sgreen * All rights reserved.
786669Sgreen *
886669Sgreen * Redistribution and use in source and binary forms, with or without
986669Sgreen * modification, are permitted provided that the following conditions
1086669Sgreen * are met:
1186669Sgreen * 1. Redistributions of source code must retain the above copyright
1286669Sgreen *    notice, this list of conditions and the following disclaimer.
1386669Sgreen * 2. Redistributions in binary form must reproduce the above copyright
1486669Sgreen *    notice, this list of conditions and the following disclaimer in the
1586669Sgreen *    documentation and/or other materials provided with the distribution.
1686669Sgreen * 3. The name of the author may not be used to endorse or promote products
1786669Sgreen *    derived from this software without specific prior written permission.
1886669Sgreen *
1986669Sgreen * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
2086669Sgreen * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
2186669Sgreen * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
2286669Sgreen * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
2386669Sgreen * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
2486669Sgreen * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
2586669Sgreen * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
2686669Sgreen * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
2786669Sgreen * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
2886669Sgreen * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2986669Sgreen */
3086669Sgreen
3186669Sgreen#ifndef _READPASSPHRASE_H_
3286669Sgreen#define _READPASSPHRASE_H_
3386669Sgreen
3486669Sgreen#define RPP_ECHO_OFF    0x00		/* Turn off echo (default). */
3586669Sgreen#define RPP_ECHO_ON     0x01		/* Leave echo on. */
3686669Sgreen#define RPP_REQUIRE_TTY 0x02		/* Fail if there is no tty. */
3786669Sgreen#define RPP_FORCELOWER  0x04		/* Force input to lower case. */
3886669Sgreen#define RPP_FORCEUPPER  0x08		/* Force input to upper case. */
3986669Sgreen#define RPP_SEVENBIT    0x10		/* Strip the high bit from input. */
4086669Sgreen
4186669Sgreen#include <sys/cdefs.h>
42178863Sscf#include <sys/_types.h>
4386669Sgreen
44178863Sscf#ifndef _SIZE_T_DECLARED
45178863Sscftypedef	__size_t	size_t;
46178863Sscf#define	_SIZE_T_DECLARED
47178863Sscf#endif
48178863Sscf
4986669Sgreen__BEGIN_DECLS
5091911Sgreenchar * readpassphrase(const char *, char *, size_t, int);
5186669Sgreen__END_DECLS
5286669Sgreen
5386669Sgreen#endif /* !_READPASSPHRASE_H_ */
54