readpassphrase.h revision 91911
150276Speter/* $OpenBSD: /usr/local/www/cvsroot/OpenBSD/src/include/readpassphrase.h,v 1.2 2002/02/16 21:27:17 millert Exp $ */ 2184989Srafan/* $FreeBSD: head/include/readpassphrase.h 91911 2002-03-08 20:52:52Z green $ */ 350276Speter 450276Speter/* 550276Speter * Copyright (c) 2000 Todd C. Miller <Todd.Miller@courtesan.com> 650276Speter * All rights reserved. 750276Speter * 850276Speter * Redistribution and use in source and binary forms, with or without 950276Speter * modification, are permitted provided that the following conditions 1050276Speter * are met: 1150276Speter * 1. Redistributions of source code must retain the above copyright 1250276Speter * notice, this list of conditions and the following disclaimer. 1350276Speter * 2. Redistributions in binary form must reproduce the above copyright 1450276Speter * notice, this list of conditions and the following disclaimer in the 1550276Speter * documentation and/or other materials provided with the distribution. 1650276Speter * 3. The name of the author may not be used to endorse or promote products 1750276Speter * derived from this software without specific prior written permission. 1850276Speter * 1950276Speter * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 2050276Speter * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 2150276Speter * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 2250276Speter * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 2350276Speter * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 2450276Speter * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 2550276Speter * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 2650276Speter * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 2750276Speter * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 2850276Speter * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2950276Speter */ 3050276Speter 3150276Speter#ifndef _READPASSPHRASE_H_ 3250276Speter#define _READPASSPHRASE_H_ 3350276Speter 3450276Speter#define RPP_ECHO_OFF 0x00 /* Turn off echo (default). */ 3550276Speter#define RPP_ECHO_ON 0x01 /* Leave echo on. */ 3650276Speter#define RPP_REQUIRE_TTY 0x02 /* Fail if there is no tty. */ 3750276Speter#define RPP_FORCELOWER 0x04 /* Force input to lower case. */ 3850276Speter#define RPP_FORCEUPPER 0x08 /* Force input to upper case. */ 3950276Speter#define RPP_SEVENBIT 0x10 /* Strip the high bit from input. */ 4050276Speter 4150276Speter#include <sys/cdefs.h> 42184989Srafan 4350276Speter__BEGIN_DECLS 4450276Speterchar * readpassphrase(const char *, char *, size_t, int); 4550276Speter__END_DECLS 4650276Speter 4750276Speter#endif /* !_READPASSPHRASE_H_ */ 4876726Speter