2 * This is the header file for 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.
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
12 * To compute the message digest of a chunk of bytes, declare an
13 * md5_context_s structure, pass it to MD5_Init, call MD5_Update as
14 * needed on buffers full of bytes, and then call MD5_Final, which
15 * will fill a supplied 16-byte array with the digest.
17 * Changed so as no longer to depend on Colin Plumb's `usual.h'
18 * header definitions; now uses stuff from dpkg's config.h
19 * - Ian Jackson <ian@chiark.greenend.org.uk>.
20 * Still in the public domain.
28 typedef struct md5_context_s md5_context_t
;
29 typedef byte md5_digest_t
[16];
31 struct md5_context_s
{
37 void MD5_Init(md5_context_t
*context
);
38 void MD5_Update(md5_context_t
*context
, byte
const *buf
, unsigned len
);
39 void MD5_UpdateInt32(md5_context_t
*context
, unsigned int val
);
40 void MD5_UpdateString(md5_context_t
*context
, char *str
);
41 void MD5_Final(unsigned char digest
[16], md5_context_t
*context
);
42 void MD5_Transform(uint32_t buf
[4], uint32_t const in
[16]);