• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
16 typedef struct yasm_md5_context {
17         unsigned long buf[4];
18         unsigned long bits[2];
19         unsigned char in[64];
20 } yasm_md5_context;
21 
22 YASM_LIB_DECL
23 void yasm_md5_init(yasm_md5_context *context);
24 YASM_LIB_DECL
25 void yasm_md5_update(yasm_md5_context *context, unsigned char const *buf,
26                      unsigned long len);
27 YASM_LIB_DECL
28 void yasm_md5_final(unsigned char digest[16], yasm_md5_context *context);
29 YASM_LIB_DECL
30 void yasm_md5_transform(unsigned long buf[4], const unsigned char in[64]);
31 
32 #endif /* !YASM_MD5_H */
33