readpassphrase.h revision 91911
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 91911 2002-03-08 20:52:52Z green $ */ 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> 4286669Sgreen 4386669Sgreen__BEGIN_DECLS 4491911Sgreenchar * readpassphrase(const char *, char *, size_t, int); 4586669Sgreen__END_DECLS 4686669Sgreen 4786669Sgreen#endif /* !_READPASSPHRASE_H_ */ 48