![]() |
|
|||
File indexing completed on 2025-05-11 08:24:14
0001 /* 0002 ** ******************************************************************** 0003 ** md4.h -- Header file for implementation of ** 0004 ** MD4 Message Digest Algorithm ** 0005 ** Updated: 2/13/90 by Ronald L. Rivest ** 0006 ** (C) 1990 RSA Data Security, Inc. ** 0007 ** ******************************************************************** 0008 */ 0009 0010 #include <stdint.h> 0011 0012 /* MDstruct is the data structure for a message digest computation. 0013 */ 0014 typedef struct { 0015 uint32_t buffer[4]; /* Holds 4-word result of MD computation */ 0016 uint8_t count[8]; /* Number of bits processed so far */ 0017 uint32_t done; /* Nonzero means MD computation finished */ 0018 } MD4_CTX; 0019 0020 /* MD4Init(MD4_CTX *) 0021 ** Initialize the MD4_CTX prepatory to doing a message digest 0022 ** computation. 0023 */ 0024 extern void MD4Init(MD4_CTX *MD); 0025 0026 /* MD4Update(MD,X,count) 0027 ** Input: X -- a pointer to an array of unsigned characters. 0028 ** count -- the number of bits of X to use (an unsigned int). 0029 ** Updates MD using the first "count" bits of X. 0030 ** The array pointed to by X is not modified. 0031 ** If count is not a multiple of 8, MD4Update uses high bits of 0032 ** last byte. 0033 ** This is the basic input routine for a user. 0034 ** The routine terminates the MD computation when count < 512, so 0035 ** every MD computation should end with one call to MD4Update with a 0036 ** count less than 512. Zero is OK for a count. 0037 */ 0038 extern void MD4Update(MD4_CTX *MD, unsigned char *X, unsigned int count); 0039 0040 /* MD4Print(MD) 0041 ** Prints message digest buffer MD as 32 hexadecimal digits. 0042 ** Order is from low-order byte of buffer[0] to high-order byte 0043 ** of buffer[3]. 0044 ** Each byte is printed with high-order hexadecimal digit first. 0045 */ 0046 extern void MD4Print(MD4_CTX *); 0047 0048 /* MD4Final(buf, MD) 0049 ** Returns message digest from MD and terminates the message 0050 ** digest computation. 0051 */ 0052 extern void MD4Final(unsigned char *, MD4_CTX *); 0053 0054 /* 0055 ** End of md4.h 0056 ****************************(cut)***********************************/
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |