source: rtems/cpukit/pppd/md4.h @ 203ed7f

4.104.114.84.95
Last change on this file since 203ed7f was 203ed7f, checked in by Ralf Corsepius <ralf.corsepius@…>, on 05/09/07 at 15:56:13

Include <rtems/stdint.h> instead of <stdint.h>.

  • Property mode set to 100644
File size: 2.0 KB
Line 
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#include <rtems/stdint.h>
12
13/* MDstruct is the data structure for a message digest computation.
14*/
15typedef struct {
16        uint32_t buffer[4]; /* Holds 4-word result of MD computation */
17        uint8_t  count[8];  /* Number of bits processed so far */
18        uint32_t done;      /* Nonzero means MD computation finished */
19} MD4_CTX;
20
21/* MD4Init(MD4_CTX *)
22** Initialize the MD4_CTX prepatory to doing a message digest
23** computation.
24*/
25extern void MD4Init(MD4_CTX *MD);
26
27/* MD4Update(MD,X,count)
28** Input: 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, MD4Update 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 MD4Update with a
37** count less than 512.  Zero is OK for a count.
38*/
39extern void MD4Update(MD4_CTX *MD, unsigned char *X, unsigned int count);
40
41/* MD4Print(MD)
42** Prints message digest buffer MD as 32 hexadecimal digits.
43** Order is from low-order byte of buffer[0] to high-order byte
44** of buffer[3].
45** Each byte is printed with high-order hexadecimal digit first.
46*/
47extern void MD4Print(MD4_CTX *);
48
49/* MD4Final(buf, MD)
50** Returns message digest from MD and terminates the message
51** digest computation.
52*/
53extern void MD4Final(unsigned char *, MD4_CTX *);
54
55/*
56** End of md4.h
57****************************(cut)***********************************/
Note: See TracBrowser for help on using the repository browser.