GNU libmicrohttpd
0.9.29
Main Page
Modules
Data Structures
Files
File List
Globals
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
/* Brutally hacked by John Walker back from ANSI C to K&R (no
19
prototypes) to maintain the tradition that Netfone will compile
20
with Sun's original "cc". */
21
22
#ifndef MD5_H
23
#define MD5_H
24
25
#include "
platform.h
"
26
#ifdef WORDS_BIGENDIAN
27
#define HIGHFIRST
28
#endif
29
30
#define MD5_DIGEST_SIZE 16
31
32
struct
MD5Context
33
{
34
uint32_t
buf
[4];
35
uint32_t
bits
[2];
36
unsigned
char
in
[64];
37
};
38
39
40
void
41
MD5Init
(
struct
MD5Context
*ctx);
42
43
void
44
MD5Update
(
struct
MD5Context
*ctx,
45
const
void
*buf,
46
unsigned
len);
47
48
void
49
MD5Final
(
unsigned
char
digest[
MD5_DIGEST_SIZE
],
50
struct
MD5Context
*ctx);
51
52
#endif
/* !MD5_H */
MD5Context::in
unsigned char in[64]
Definition:
md5.h:36
MD5Init
void MD5Init(struct MD5Context *ctx)
Definition:
md5.c:154
MD5Context::buf
uint32_t buf[4]
Definition:
md5.h:34
platform.h
platform-specific includes for libmicrohttpd
MD5Final
void MD5Final(unsigned char digest[MD5_DIGEST_SIZE], struct MD5Context *ctx)
MD5Update
void MD5Update(struct MD5Context *ctx, const void *buf, unsigned len)
Definition:
md5.c:170
MD5Context::bits
uint32_t bits[2]
Definition:
md5.h:35
MD5Context
Definition:
md5.h:32
MD5_DIGEST_SIZE
#define MD5_DIGEST_SIZE
Definition:
md5.h:30
src
microhttpd
md5.h
Generated by
1.8.9.1