GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / include / bcmcrypto / md4.h
blob16b4b0e67617de2cb9b411c863ade35ac427add0
1 /*
2 * Copyright (C) 2012, Broadcom Corporation. All Rights Reserved.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 * $Id: md4.h 241182 2011-02-17 21:50:03Z $
19 #ifndef _MD4_H_
20 #define _MD4_H_
23 * md4.h, copied from src/router/ppp/pppd to src/include/bcmcrypto for general use
25 * $Id: md4.h 241182 2011-02-17 21:50:03Z $
27 ** ********************************************************************
28 ** md4.h -- Header file for implementation of **
29 ** MD4 Message Digest Algorithm **
30 ** Updated: 2/13/90 by Ronald L. Rivest **
31 ** (C) 1990 RSA Data Security, Inc. **
32 ** ********************************************************************
35 #ifndef __P
36 # if defined(__STDC__) || defined(__GNUC__)
37 # define __P(x) x
38 # else
39 # define __P(x) ()
40 # endif
41 #endif /* !__P */
44 /* MDstruct is the data structure for a message digest computation.
46 typedef struct {
47 unsigned int buffer[4]; /* Holds 4-word result of MD computation */
48 unsigned char count[8]; /* Number of bits processed so far */
49 unsigned int done; /* Nonzero means MD computation finished */
50 } MD4_CTX;
52 /* MD4Init(MD4_CTX *)
53 ** Initialize the MD4_CTX prepatory to doing a message digest
54 ** computation.
56 extern void BCMROMFN(MD4Init) __P((MD4_CTX *MD));
58 /* MD4Update(MD,X,count)
59 ** Input: X -- a pointer to an array of unsigned characters.
60 ** count -- the number of bits of X to use (an unsigned int).
61 ** Updates MD using the first "count" bits of X.
62 ** The array pointed to by X is not modified.
63 ** If count is not a multiple of 8, MD4Update uses high bits of
64 ** last byte.
65 ** This is the basic input routine for a user.
66 ** The routine terminates the MD computation when count < 512, so
67 ** every MD computation should end with one call to MD4Update with a
68 ** count less than 512. Zero is OK for a count.
70 extern void BCMROMFN(MD4Update) __P((MD4_CTX *MD, unsigned char *X, unsigned int count));
72 /* MD4Print(MD)
73 ** Prints message digest buffer MD as 32 hexadecimal digits.
74 ** Order is from low-order byte of buffer[0] to high-order byte
75 ** of buffer[3].
76 ** Each byte is printed with high-order hexadecimal digit first.
78 extern void MD4Print __P((MD4_CTX *));
80 /* MD4Final(buf, MD)
81 ** Returns message digest from MD and terminates the message
82 ** digest computation.
84 extern void BCMROMFN(MD4Final) __P((unsigned char *, MD4_CTX *));
87 ** End of md4.h
90 #endif /* _MD4_H_ */