| version 1.1, 2012/02/17 15:09:30 | version 1.1.1.2, 2021/03/17 00:32:36 | 
| Line 1 | Line 1 | 
 | /* The include file for both the MD4 and MD5 routines. */ | /* The include file for both the MD4 and MD5 routines. */ | 
 |  |  | 
| #define MD4_DIGEST_LEN 16 | #ifdef USE_OPENSSL | 
| #define MD5_DIGEST_LEN 16 | #include "openssl/md4.h" | 
| #define MAX_DIGEST_LEN MD5_DIGEST_LEN | #include "openssl/md5.h" | 
|  | #endif | 
|  | #include "md-defines.h" | 
 |  |  | 
 | #define CSUM_CHUNK 64 |  | 
 |  |  | 
 | typedef struct { | typedef struct { | 
 | uint32 A, B, C, D; | uint32 A, B, C, D; | 
 | uint32 totalN;          /* bit count, lower 32 bits */ | uint32 totalN;          /* bit count, lower 32 bits */ | 
| Line 17  void mdfour_begin(md_context *md); | Line 17  void mdfour_begin(md_context *md); | 
 | void mdfour_update(md_context *md, const uchar *in, uint32 length); | void mdfour_update(md_context *md, const uchar *in, uint32 length); | 
 | void mdfour_result(md_context *md, uchar digest[MD4_DIGEST_LEN]); | void mdfour_result(md_context *md, uchar digest[MD4_DIGEST_LEN]); | 
 |  |  | 
| void get_mdfour(uchar digest[MD4_DIGEST_LEN], const uchar *in, int length); | #ifndef USE_OPENSSL | 
|  | #define MD5_CTX md_context | 
|  | #define MD5_Init md5_begin | 
|  | #define MD5_Update md5_update | 
|  | #define MD5_Final(digest, cptr) md5_result(cptr, digest) | 
 |  |  | 
 | void md5_begin(md_context *ctx); | void md5_begin(md_context *ctx); | 
 | void md5_update(md_context *ctx, const uchar *input, uint32 length); | void md5_update(md_context *ctx, const uchar *input, uint32 length); | 
 | void md5_result(md_context *ctx, uchar digest[MD5_DIGEST_LEN]); | void md5_result(md_context *ctx, uchar digest[MD5_DIGEST_LEN]); | 
 |  | #endif | 
 |  |  | 
| void get_md5(uchar digest[MD5_DIGEST_LEN], const uchar *input, int n); | typedef struct { | 
|  | uchar context_storage[1024]; | 
|  | uchar buffer[512]; | 
|  | unsigned int used; | 
|  | unsigned int next; | 
|  | } MD5P8_CTX; | 
|  |  | 
|  | void MD5P8_Init(MD5P8_CTX *ctx); | 
|  | void MD5P8_Update(MD5P8_CTX *ctx, const uchar *input, uint32 length); | 
|  | void MD5P8_Final(uchar digest[MD5_DIGEST_LEN], MD5P8_CTX *ctx); |