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