#ifndef MD5_H #define MD5_H #ifdef __cplusplus extern "C" { #endif #include #include void make_digest(char *md5str, const unsigned char *digest); void make_digest_ex(char *md5str, const unsigned char *digest, int len); /* * This is an OpenSSL-compatible implementation of the RSA Data Security, * Inc. MD5 Message-Digest Algorithm (RFC 1321). * * Written by Solar Designer in 2001, and placed * in the public domain. There's absolutely no warranty. * * See md5.c for more information. */ /* MD5 context. */ typedef struct { uint32_t lo, hi; uint32_t a, b, c, d; unsigned char buffer[64]; uint32_t block[16]; } MD5_CTX; void MD5Init(MD5_CTX *ctx); void MD5Update(MD5_CTX *ctx, const void *data, size_t size); void MD5Final(unsigned char *result, MD5_CTX *ctx); void md5(void *data, size_t data_size, void *hashstr); #ifdef __cplusplus } #endif #endif