#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);
_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.