1*2175Sjp161948=pod 2*2175Sjp161948 3*2175Sjp161948=head1 NAME 4*2175Sjp161948 5*2175Sjp161948des_read_password, des_read_2passwords, des_read_pw_string, des_read_pw - 6*2175Sjp161948Compatibility user interface functions 7*2175Sjp161948 8*2175Sjp161948=head1 SYNOPSIS 9*2175Sjp161948 10*2175Sjp161948 int des_read_password(DES_cblock *key,const char *prompt,int verify); 11*2175Sjp161948 int des_read_2passwords(DES_cblock *key1,DES_cblock *key2, 12*2175Sjp161948 const char *prompt,int verify); 13*2175Sjp161948 14*2175Sjp161948 int des_read_pw_string(char *buf,int length,const char *prompt,int verify); 15*2175Sjp161948 int des_read_pw(char *buf,char *buff,int size,const char *prompt,int verify); 16*2175Sjp161948 17*2175Sjp161948=head1 DESCRIPTION 18*2175Sjp161948 19*2175Sjp161948The DES library contained a few routines to prompt for passwords. These 20*2175Sjp161948aren't necessarely dependent on DES, and have therefore become part of the 21*2175Sjp161948UI compatibility library. 22*2175Sjp161948 23*2175Sjp161948des_read_pw() writes the string specified by I<prompt> to standard output 24*2175Sjp161948turns echo off and reads an input string from the terminal. The string is 25*2175Sjp161948returned in I<buf>, which must have spac for at least I<size> bytes. 26*2175Sjp161948If I<verify> is set, the user is asked for the password twice and unless 27*2175Sjp161948the two copies match, an error is returned. The second password is stored 28*2175Sjp161948in I<buff>, which must therefore also be at least I<size> bytes. A return 29*2175Sjp161948code of -1 indicates a system error, 1 failure due to use interaction, and 30*2175Sjp1619480 is success. All other functions described here use des_read_pw() to do 31*2175Sjp161948the work. 32*2175Sjp161948 33*2175Sjp161948des_read_pw_string() is a variant of des_read_pw() that provides a buffer 34*2175Sjp161948for you if I<verify> is set. 35*2175Sjp161948 36*2175Sjp161948des_read_password() calls des_read_pw() and converts the password to a 37*2175Sjp161948DES key by calling DES_string_to_key(); des_read_2password() operates in 38*2175Sjp161948the same way as des_read_password() except that it generates two keys 39*2175Sjp161948by using the DES_string_to_2key() function. 40*2175Sjp161948 41*2175Sjp161948=head1 NOTES 42*2175Sjp161948 43*2175Sjp161948des_read_pw_string() is available in the MIT Kerberos library as well, and 44*2175Sjp161948is also available under the name EVP_read_pw_string(). 45*2175Sjp161948 46*2175Sjp161948=head1 SEE ALSO 47*2175Sjp161948 48*2175Sjp161948L<ui(3)|ui(3)>, L<ui_create(3)|ui_create(3)> 49*2175Sjp161948 50*2175Sjp161948=head1 AUTHOR 51*2175Sjp161948 52*2175Sjp161948Richard Levitte (richard@levitte.org) for the OpenSSL project 53*2175Sjp161948(http://www.openssl.org). 54*2175Sjp161948 55*2175Sjp161948=cut 56