ui_compat 3 2008-05-09 0.9.9-dev OpenSSL

NAME

des_read_password, des_read_2passwords, des_read_pw_string, des_read_pw - Compatibility user interface functions

LIBRARY

libcrypto, -lcrypto

SYNOPSIS


 #include 


 int des_read_password(DES_cblock *key,const char *prompt,int verify);
 int des_read_2passwords(DES_cblock *key1,DES_cblock *key2,
        const char *prompt,int verify);


 int des_read_pw_string(char *buf,int length,const char *prompt,int verify);
 int des_read_pw(char *buf,char *buff,int size,const char *prompt,int verify);

DESCRIPTION

The DES library contained a few routines to prompt for passwords. These aren't necessarely dependent on DES, and have therefore become part of the UI compatibility library.

_d_e_s___r_e_a_d___p_w_(_) writes the string specified by _p_r_o_m_p_t to standard output turns echo off and reads an input string from the terminal. The string is returned in _b_u_f, which must have spac for at least _s_i_z_e bytes. If _v_e_r_i_f_y is set, the user is asked for the password twice and unless the two copies match, an error is returned. The second password is stored in _b_u_f_f, which must therefore also be at least _s_i_z_e bytes. A return code of -1 indicates a system error, 1 failure due to use interaction, and 0 is success. All other functions described here use _d_e_s___r_e_a_d___p_w_(_) to do the work.

_d_e_s___r_e_a_d___p_w___s_t_r_i_n_g_(_) is a variant of _d_e_s___r_e_a_d___p_w_(_) that provides a buffer for you if _v_e_r_i_f_y is set.

_d_e_s___r_e_a_d___p_a_s_s_w_o_r_d_(_) calls _d_e_s___r_e_a_d___p_w_(_) and converts the password to a DES key by calling _D_E_S___s_t_r_i_n_g___t_o___k_e_y_(_); _d_e_s___r_e_a_d___2_p_a_s_s_w_o_r_d_(_) operates in the same way as _d_e_s___r_e_a_d___p_a_s_s_w_o_r_d_(_) except that it generates two keys by using the _D_E_S___s_t_r_i_n_g___t_o___2_k_e_y_(_) function.

NOTES

_d_e_s___r_e_a_d___p_w___s_t_r_i_n_g_(_) is available in the MIT Kerberos library as well, and is also available under the name _E_V_P___r_e_a_d___p_w___s_t_r_i_n_g_(_).

SEE ALSO

_u_i(3), _u_i___c_r_e_a_t_e(3)

AUTHOR

Richard Levitte (richard@levitte.org) for the OpenSSL project (http://www.openssl.org).