7
8
** ********************************************************************
12
# if defined(__STDC__) || defined(__GNUC__)
10
20
/* MDstruct is the data structure for a message digest computation.
13
unsigned int buffer[4]; /* Holds 4-word result of MD computation */
14
unsigned char count[8]; /* Number of bits processed so far */
15
unsigned int done; /* Nonzero means MD computation finished */
23
unsigned int buffer[4]; /* Holds 4-word result of MD computation */
24
unsigned char count[8]; /* Number of bits processed so far */
25
unsigned int done; /* Nonzero means MD computation finished */
19
** Input: MD -- an MDptr
20
** Initialize the MDstruct prepatory to doing a message digest
29
** Initialize the MD4_CTX prepatory to doing a message digest
23
extern void MDbegin();
32
extern void MD4Init __P((MD4_CTX *MD));
25
/* MDupdate(MD,X,count)
26
** Input: MD -- an MDptr
27
** X -- a pointer to an array of unsigned characters.
34
/* MD4Update(MD,X,count)
35
** Input: X -- a pointer to an array of unsigned characters.
28
36
** count -- the number of bits of X to use (an unsigned int).
29
37
** Updates MD using the first "count" bits of X.
30
38
** The array pointed to by X is not modified.
31
** If count is not a multiple of 8, MDupdate uses high bits of
39
** If count is not a multiple of 8, MD4Update uses high bits of
33
41
** This is the basic input routine for a user.
34
42
** The routine terminates the MD computation when count < 512, so
35
** every MD computation should end with one call to MDupdate with a
43
** every MD computation should end with one call to MD4Update with a
36
44
** count less than 512. Zero is OK for a count.
38
extern void MDupdate();
46
extern void MD4Update __P((MD4_CTX *MD, unsigned char *X, unsigned int count));
41
** Input: MD -- an MDptr
42
49
** Prints message digest buffer MD as 32 hexadecimal digits.
43
50
** Order is from low-order byte of buffer[0] to high-order byte
45
52
** Each byte is printed with high-order hexadecimal digit first.
47
extern void MDprint();
54
extern void MD4Print __P((MD4_CTX *));
57
** Returns message digest from MD and terminates the message
58
** digest computation.
60
extern void MD4Final __P((unsigned char *, MD4_CTX *));