xref: /haiku/src/libs/libsolv/solv/md5.h (revision f491972ca97c30b7b4ff6cf072de7bb345d58a69)
1*f491972cSAugustin Cavalier /*
2*f491972cSAugustin Cavalier  * This is an OpenSSL-compatible implementation of the RSA Data Security,
3*f491972cSAugustin Cavalier  * Inc. MD5 Message-Digest Algorithm.
4*f491972cSAugustin Cavalier  *
5*f491972cSAugustin Cavalier  * Written by Solar Designer <solar@openwall.com> in 2001, and placed in
6*f491972cSAugustin Cavalier  * the public domain.  See md5.c for more information.
7*f491972cSAugustin Cavalier  */
8*f491972cSAugustin Cavalier 
9*f491972cSAugustin Cavalier /* Any 32-bit or wider unsigned integer data type will do */
10*f491972cSAugustin Cavalier typedef unsigned long MD5_u32plus;
11*f491972cSAugustin Cavalier 
12*f491972cSAugustin Cavalier typedef struct {
13*f491972cSAugustin Cavalier 	MD5_u32plus lo, hi;
14*f491972cSAugustin Cavalier 	MD5_u32plus a, b, c, d;
15*f491972cSAugustin Cavalier 	unsigned char buffer[64];
16*f491972cSAugustin Cavalier 	MD5_u32plus block[16];
17*f491972cSAugustin Cavalier } MD5_CTX;
18*f491972cSAugustin Cavalier 
19*f491972cSAugustin Cavalier extern void solv_MD5_Init(MD5_CTX *ctx);
20*f491972cSAugustin Cavalier extern void solv_MD5_Update(MD5_CTX *ctx, void *data, unsigned long size);
21*f491972cSAugustin Cavalier extern void solv_MD5_Final(unsigned char *result, MD5_CTX *ctx);
22