GNU libmicrohttpd
0.9.63
md5.h
Go to the documentation of this file.
1
/*
2
* This code implements the MD5 message-digest algorithm.
3
* The algorithm is due to Ron Rivest. This code was
4
* written by Colin Plumb in 1993, no copyright is claimed.
5
* This code is in the public domain; do with it what you wish.
6
*
7
* Equivalent code is available from RSA Data Security, Inc.
8
* This code has been tested against that, and is equivalent,
9
* except that you don't need to include two pages of legalese
10
* with every copy.
11
*
12
* To compute the message digest of a chunk of bytes, declare an
13
* MD5Context structure, pass it to MD5Init, call MD5Update as
14
* needed on buffers full of bytes, and then call MD5Final, which
15
* will fill a supplied 16-byte array with the digest.
16
*/
17
18
#ifndef MHD_MD5_H
19
#define MHD_MD5_H
20
21
#include "
platform.h
"
22
23
#define MD5_BLOCK_SIZE 64
24
#define MD5_DIGEST_SIZE 16
25
#define MD5_DIGEST_STRING_LENGTH (MD5_DIGEST_SIZE * 2 + 1)
26
27
struct
MD5Context
28
{
29
uint32_t
state
[4];
/* state */
30
uint64_t
count
;
/* number of bits, mod 2^64 */
31
uint8_t
buffer
[
MD5_BLOCK_SIZE
];
/* input buffer */
32
};
33
34
41
void
42
MD5Init
(
void
*ctx_);
43
44
51
void
52
MD5Update
(
void
*ctx_,
53
const
uint8_t *input,
54
size_t
len);
55
56
62
void
63
MD5Final
(
void
*ctx_,
64
unsigned
char
digest[
MD5_DIGEST_SIZE
]);
65
66
67
#endif
/* !MHD_MD5_H */
MD5Context::buffer
uint8_t buffer[MD5_BLOCK_SIZE]
Definition:
md5.h:31
MD5Context::count
uint64_t count
Definition:
md5.h:30
platform.h
platform-specific includes for libmicrohttpd
MD5Update
void MD5Update(void *ctx_, const uint8_t *input, size_t len)
Definition:
md5.c:237
MD5_BLOCK_SIZE
#define MD5_BLOCK_SIZE
Definition:
md5.h:23
MD5Context
Definition:
md5.h:27
MD5_DIGEST_SIZE
#define MD5_DIGEST_SIZE
Definition:
md5.h:24
MD5Final
void MD5Final(void *ctx_, unsigned char digest[MD5_DIGEST_SIZE])
Definition:
md5.c:99
MD5Init
void MD5Init(void *ctx_)
Definition:
md5.c:53
MD5Context::state
uint32_t state[4]
Definition:
md5.h:29
src
microhttpd
md5.h
Generated by
1.8.14