File: md5.h

package info (click to toggle)
yasm 0.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 12,200 kB
  • ctags: 18,827
  • sloc: asm: 73,479; ansic: 48,942; sh: 9,773; python: 8,913; xml: 1,108; makefile: 147; pascal: 62; sed: 16
file content (36 lines) | stat: -rw-r--r-- 1,086 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* See md5.c for explanation and copyright information.  */

/*
 * $Id: md5.h 2101 2008-05-23 06:46:51Z peter $
 */

#ifndef YASM_MD5_H
#define YASM_MD5_H

#ifndef YASM_LIB_DECL
#define YASM_LIB_DECL
#endif

/* Unlike previous versions of this code, uint32 need not be exactly
   32 bits, merely 32 bits or more.  Choosing a data type which is 32
   bits instead of 64 is not important; speed is considerably more
   important.  ANSI guarantees that "unsigned long" will be big enough,
   and always using it seems to have few disadvantages.  */

typedef struct yasm_md5_context {
        unsigned long buf[4];
        unsigned long bits[2];
        unsigned char in[64];
} yasm_md5_context;

YASM_LIB_DECL
void yasm_md5_init(yasm_md5_context *context);
YASM_LIB_DECL
void yasm_md5_update(yasm_md5_context *context, unsigned char const *buf,
                     unsigned long len);
YASM_LIB_DECL
void yasm_md5_final(unsigned char digest[16], yasm_md5_context *context);
YASM_LIB_DECL
void yasm_md5_transform(unsigned long buf[4], const unsigned char in[64]);

#endif /* !YASM_MD5_H */