1/* See md5.c for explanation and copyright information.  */
2
3#ifndef YASM_MD5_H
4#define YASM_MD5_H
5
6#ifndef YASM_LIB_DECL
7#define YASM_LIB_DECL
8#endif
9
10/* Unlike previous versions of this code, uint32 need not be exactly
11   32 bits, merely 32 bits or more.  Choosing a data type which is 32
12   bits instead of 64 is not important; speed is considerably more
13   important.  ANSI guarantees that "unsigned long" will be big enough,
14   and always using it seems to have few disadvantages.  */
15
16typedef struct yasm_md5_context {
17        unsigned long buf[4];
18        unsigned long bits[2];
19        unsigned char in[64];
20} yasm_md5_context;
21
22YASM_LIB_DECL
23void yasm_md5_init(yasm_md5_context *context);
24YASM_LIB_DECL
25void yasm_md5_update(yasm_md5_context *context, unsigned char const *buf,
26                     unsigned long len);
27YASM_LIB_DECL
28void yasm_md5_final(unsigned char digest[16], yasm_md5_context *context);
29YASM_LIB_DECL
30void yasm_md5_transform(unsigned long buf[4], const unsigned char in[64]);
31
32#endif /* !YASM_MD5_H */
33