-
Notifications
You must be signed in to change notification settings - Fork 1
/
md5_impl.h
35 lines (27 loc) · 799 Bytes
/
md5_impl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
* This is an OpenSSL-compatible implementation of the RSA Data Security,
* Inc. MD5 Message-Digest Algorithm.
*
* Written by Solar Designer <solar@openwall.com> in 2001, and placed in
* the public domain. See md5c.c for more information.
*/
#ifndef MD5_IMPL_H_INCLUDED
#define MD5_IMPL_H_INCLUDED
/* Any 32-bit or wider integer data type will do */
typedef unsigned long MD5_u32plus;
typedef struct {
MD5_u32plus lo, hi;
MD5_u32plus a, b, c, d;
unsigned char buffer[64];
MD5_u32plus block[16];
} MD5_CTX;
#ifdef __cplusplus
extern "C" {
#endif
extern void MD5_Init(MD5_CTX *ctx);
extern void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size);
extern void MD5_Final(unsigned char *result, MD5_CTX *ctx);
#ifdef __cplusplus
}
#endif
#endif /* MD5_IMPL_H_INCLUDED */