-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmd5.h
36 lines (31 loc) · 1.26 KB
/
md5.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
35
36
/* md5.h
* Copyright (C) 2005 Tillmann Werner <[email protected]>
*
* This file is free software; as a special exception the author gives
* unlimited permission to copy and/or distribute it, with or without
* modifications, as long as this notice is preserved.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* This code is based on an OpenSSL-compatible implementation of the RSA
* Data Security, * Inc. MD5 Message-Digest Algorithm, written by Solar
* Designer <solar at openwall.com> in 2001, and placed in the public
* domain. There's absolutely no warranty. See md5.c for more information.
*/
#ifndef __HONEYTRAP_MD5_H
#define __HONEYTRAP_MD5_H
/* Any 32-bit or wider unsigned 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;
extern void MD5_Init(MD5_CTX *ctx);
extern void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size);
extern void MD5_Final(unsigned char *result, MD5_CTX *ctx);
char *mem_md5sum(u_char *msg, u_int32_t size);
#endif