source: rtems/cpukit/pppd/md4.h @ 300c914c

4.104.114.84.95
Last change on this file since 300c914c was 300c914c, checked in by Joel Sherrill <joel.sherrill@…>, on 09/01/06 at 18:15:01

* empty log message *

  • Property mode set to 100644
File size: 2.1 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#ifndef __P
12# if defined(__STDC__) || defined(__GNUC__)
13#  define __P(x) x
14# else
15#  define __P(x) ()
16# endif
17#endif
18
19#include <stdint.h>
20
21/* MDstruct is the data structure for a message digest computation.
22*/
23typedef struct {
24        uint32_t buffer[4]; /* Holds 4-word result of MD computation */
25        uint8_t  count[8];  /* Number of bits processed so far */
26        uint32_t done;      /* Nonzero means MD computation finished */
27} MD4_CTX;
28
29/* MD4Init(MD4_CTX *)
30** Initialize the MD4_CTX prepatory to doing a message digest
31** computation.
32*/
33extern void MD4Init __P((MD4_CTX *MD));
34
35/* MD4Update(MD,X,count)
36** Input: X -- a pointer to an array of unsigned characters.
37**        count -- the number of bits of X to use (an unsigned int).
38** Updates MD using the first "count" bits of X.
39** The array pointed to by X is not modified.
40** If count is not a multiple of 8, MD4Update uses high bits of
41** last byte.
42** This is the basic input routine for a user.
43** The routine terminates the MD computation when count < 512, so
44** every MD computation should end with one call to MD4Update with a
45** count less than 512.  Zero is OK for a count.
46*/
47extern void MD4Update __P((MD4_CTX *MD, unsigned char *X, unsigned int count));
48
49/* MD4Print(MD)
50** Prints message digest buffer MD as 32 hexadecimal digits.
51** Order is from low-order byte of buffer[0] to high-order byte
52** of buffer[3].
53** Each byte is printed with high-order hexadecimal digit first.
54*/
55extern void MD4Print __P((MD4_CTX *));
56
57/* MD4Final(buf, MD)
58** Returns message digest from MD and terminates the message
59** digest computation.
60*/
61extern void MD4Final __P((unsigned char *, MD4_CTX *));
62
63/*
64** End of md4.h
65****************************(cut)***********************************/
Note: See TracBrowser for help on using the repository browser.