2 * This is an OpenSSL-compatible implementation of the RSA Data Security,
3 * Inc. MD4 Message-Digest Algorithm.
5 * Written by Solar Designer <solar@openwall.com> in 2001, and placed in
6 * the public domain. See md4.c for more information.
13 #include "stdint.msvc.h"
20 /* Number of bytes that must be allocated for context */
21 unsigned int context_size;
22 /* Number of bytes that must be allocated for result()'s digest */
23 unsigned int digest_size;
25 void (*init)(void *context);
26 void (*loop)(void *context, const void *data, size_t size);
27 void (*result)(void *context, unsigned char *digest_r);
30 const struct hash_method *hash_method_lookup(const char *name);
32 /* NULL-terminated list of all hash methods */
33 extern const struct hash_method *hash_methods[];
35 #define MD4_RESULTLEN (128/8)
39 uint_fast32_t a, b, c, d;
40 unsigned char buffer[64];
41 uint_fast32_t block[MD4_RESULTLEN];
44 void md4_init(struct md4_context *ctx);
45 void md4_update(struct md4_context *ctx, const void *data, size_t size);
46 void md4_final(struct md4_context *ctx, unsigned char result[MD4_RESULTLEN]);
48 void md4_get_digest(const void *data, size_t size,
49 unsigned char result[MD4_RESULTLEN]);
51 extern const struct hash_method hash_method_md4;