]> git.ozlabs.org Git - ppp.git/blob - pppd/md4.h
moved protos here from ccp.h; log details of compression in use
[ppp.git] / pppd / md4.h
1
2 /*
3 ** ********************************************************************
4 ** md4.h -- Header file for implementation of                        **
5 ** MD4 Message Digest Algorithm                                      **
6 ** Updated: 2/13/90 by Ronald L. Rivest                              **
7 ** (C) 1990 RSA Data Security, Inc.                                  **
8 ** ********************************************************************
9 */
10
11 /* MDstruct is the data structure for a message digest computation.
12 */
13 typedef struct {
14 unsigned int buffer[4]; /* Holds 4-word result of MD computation */
15 unsigned char count[8]; /* Number of bits processed so far */
16 unsigned int done;      /* Nonzero means MD computation finished */
17 } MDstruct, *MDptr;
18
19 /* MDbegin(MD)
20 ** Input: MD -- an MDptr
21 ** Initialize the MDstruct prepatory to doing a message digest
22 ** computation.
23 */
24 extern void MDbegin();
25
26 /* MDupdate(MD,X,count)
27 ** Input: MD -- an MDptr
28 **        X -- a pointer to an array of unsigned characters.
29 **        count -- the number of bits of X to use (an unsigned int).
30 ** Updates MD using the first "count" bits of X.
31 ** The array pointed to by X is not modified.
32 ** If count is not a multiple of 8, MDupdate uses high bits of
33 ** last byte.
34 ** This is the basic input routine for a user.
35 ** The routine terminates the MD computation when count < 512, so
36 ** every MD computation should end with one call to MDupdate with a
37 ** count less than 512.  Zero is OK for a count.
38 */
39 extern void MDupdate();
40
41 /* MDprint(MD)
42 ** Input: MD -- an MDptr
43 ** Prints message digest buffer MD as 32 hexadecimal digits.
44 ** Order is from low-order byte of buffer[0] to high-order byte
45 ** of buffer[3].
46 ** Each byte is printed with high-order hexadecimal digit first.
47 */
48 extern void MDprint();
49
50 /*
51 ** End of md4.h
52 ****************************(cut)***********************************/