1.Dd $Mdocdate: November 15 2015 $ 2.Dt DES_READ_PW 3 3.Os 4.Sh NAME 5.Nm des_read_password , 6.Nm des_read_2passwords , 7.Nm des_read_pw_string , 8.Nm des_read_pw 9.Nd Compatibility user interface functions 10.Sh SYNOPSIS 11.In openssl/des_old.h 12.Ft int 13.Fo des_read_password 14.Fa "DES_cblock *key" 15.Fa "const char *prompt" 16.Fa "int verify" 17.Fc 18.Ft int 19.Fo des_read_2passwords 20.Fa "DES_cblock *key1" 21.Fa "DES_cblock *key2" 22.Fa "const char *prompt" 23.Fa "int verify" 24.Fc 25.Ft int 26.Fo des_read_pw_string 27.Fa "char *buf" 28.Fa "int length" 29.Fa "const char *prompt" 30.Fa "int verify" 31.Fc 32.Ft int 33.Fo des_read_pw 34.Fa "char *buf" 35.Fa "char *buff" 36.Fa "int size" 37.Fa "const char *prompt" 38.Fa "int verify" 39.Fc 40.Sh DESCRIPTION 41The DES library contained a few routines to prompt for passwords. 42These aren't necessarily dependent on DES, and have therefore become 43part of the UI compatibility library. 44.Pp 45.Fn des_read_pw 46writes the string specified by 47.Fa prompt 48to standard output turns echo off and reads an input string from the 49terminal. 50The string is returned in 51.Fa buf , 52which must have space for at least 53.Fa size 54bytes. 55If 56.Fa verify 57is set, the user is asked for the password twice and unless the two 58copies match, an error is returned. 59The second password is stored in 60.Fa buff , 61which must therefore also be at least 62.Fa size 63bytes. 64A return code of -1 indicates a system error, 1 failure due to use 65interaction, and 0 is success. 66All other functions described here use 67.Fn des_read_pw 68to do the work. 69.Pp 70.Fn des_read_pw_string 71is a variant of 72.Fn des_read_pw 73that provides a buffer for you if 74.Fa verify 75is set. 76.Pp 77.Fn des_read_password 78calls 79.Fn des_read_pw 80and converts the password to a DES key by calling 81.Xr DES_string_to_key 3 ; 82.Fn des_read_2passwords 83operates in the same way as 84.Fn des_read_password 85except that it generates two keys by using the 86.Xr DES_string_to_2key 3 87function. 88.Sh NOTES 89.Fn des_read_pw_string 90is available in the MIT Kerberos library as well, and is also available 91under the name 92.Xr EVP_read_pw_string 3 . 93.Sh SEE ALSO 94.Xr UI_new 3 95.Sh AUTHORS 96.An Richard Levitte Aq Mt richard@levitte.org 97for the OpenSSL project. 98