]> git.evergreen-ils.org Git - OpenSRF.git/blob - include/opensrf/md5.h
Add compilation guard; prepare for #inclusion in C++
[OpenSRF.git] / include / opensrf / md5.h
1 /* --- The MD5 routines --- */
2
3 /* MD5 routines, after Ron Rivest */
4 /* Written by David Madore <david.madore@ens.fr>, with code taken in
5  * part from Colin Plumb. */
6 /* Public domain (1999/11/24) */
7
8 /* Note: these routines do not depend on endianness. */
9
10 /* === The header === */
11
12 /* Put this in md5.h if you don't like having everything in one big
13  * file. */
14
15 #ifndef _DMADORE_MD5_H
16 #define _DMADORE_MD5_H
17
18 struct md5_ctx {
19   /* The four chaining variables */
20   unsigned long buf[4];
21   /* Count number of message bits */
22   unsigned long bits[2];
23   /* Data being fed in */
24   unsigned long in[16];
25   /* Our position within the 512 bits (always between 0 and 63) */
26   int b;
27 };
28
29 void MD5_transform (unsigned long buf[4], const unsigned long in[16]);
30 void MD5_start (struct md5_ctx *context);
31 void MD5_feed (struct md5_ctx *context, unsigned char inb);
32 void MD5_stop (struct md5_ctx *context, unsigned char digest[16]);
33
34 #endif /* not defined _DMADORE_MD5_H */
35