mdc2(3) OpenSSL mdc2(3) NNAAMMEE MDC2, MDC2_Init, MDC2_Update, MDC2_Final - MDC2 hash function SSYYNNOOPPSSIISS #include unsigned char *MDC2(const unsigned char *d, unsigned long n, unsigned char *md); int MDC2_Init(MDC2_CTX *c); int MDC2_Update(MDC2_CTX *c, const unsigned char *data, unsigned long len); int MDC2_Final(unsigned char *md, MDC2_CTX *c); DDEESSCCRRIIPPTTIIOONN MDC2 is a method to construct hash functions with 128 bit output from block ciphers. These functions are an implementation of MDC2 with DES. _M_D_C_2_(_) computes the MDC2 message digest of the nn bytes at dd and places it in mmdd (which must have space for MDC2_DIGEST_LENGTH == 16 bytes of output). If mmdd is NULL, the digest is placed in a static array. The following functions may be used if the message is not completely stored in memory: _M_D_C_2___I_n_i_t_(_) initializes a MMDDCC22__CCTTXX structure. _M_D_C_2___U_p_d_a_t_e_(_) can be called repeatedly with chunks of the message to be hashed (lleenn bytes at ddaattaa). _M_D_C_2___F_i_n_a_l_(_) places the message digest in mmdd, which must have space for MDC2_DIGEST_LENGTH == 16 bytes of output, and erases the MMDDCC22__CCTTXX. Applications should use the higher level functions _E_V_P___D_i_g_e_s_t_I_n_i_t(3) etc. instead of calling the hash functions directly. RREETTUURRNN VVAALLUUEESS _M_D_C_2_(_) returns a pointer to the hash value. _M_D_C_2___I_n_i_t_(_), _M_D_C_2___U_p_d_a_t_e_(_) and _M_D_C_2___F_i_n_a_l_(_) return 1 for success, 0 otherwise. CCOONNFFOORRMMIINNGG TTOO ISO/IEC 10118-2, with DES SSEEEE AALLSSOO _s_h_a(3), _E_V_P___D_i_g_e_s_t_I_n_i_t(3) HHIISSTTOORRYY _M_D_C_2_(_), _M_D_C_2___I_n_i_t_(_), _M_D_C_2___U_p_d_a_t_e_(_) and _M_D_C_2___F_i_n_a_l_(_) are available since SSLeay 0.8. 1.0.2u 2019-12-20 mdc2(3)