diff options
| author | John Kohl <jtkohl@mit.edu> | 1990-11-07 14:12:29 +0000 |
|---|---|---|
| committer | John Kohl <jtkohl@mit.edu> | 1990-11-07 14:12:29 +0000 |
| commit | aac285da379ec2a12aea7029863c2906c45d4e84 (patch) | |
| tree | d5dbdc659f1b93d0bfa50e93e5fa4c086298185a /src/include | |
| parent | a00a34c00786b5663bffa26c306282ff89e20f56 (diff) | |
| download | krb5-aac285da379ec2a12aea7029863c2906c45d4e84.tar.gz krb5-aac285da379ec2a12aea7029863c2906c45d4e84.tar.xz krb5-aac285da379ec2a12aea7029863c2906c45d4e84.zip | |
Initial code from RFC
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1414 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/krb5/rsa-md4.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/src/include/krb5/rsa-md4.h b/src/include/krb5/rsa-md4.h new file mode 100644 index 000000000..2edb67c7a --- /dev/null +++ b/src/include/krb5/rsa-md4.h @@ -0,0 +1,66 @@ +/* + * $Source$ + * $Author$ + * $Id$ + */ + +/* + * md4.h from RFC1186 + * + * $Log$ + * Revision 5.0 1990/11/07 14:12:21 jtkohl + * Initial code from RFC + * + */ + +/* +** ******************************************************************** +** md4.h -- Header file for implementation of ** +** MD4 Message Digest Algorithm ** +** Updated: 2/13/90 by Ronald L. Rivest ** +** (C) 1990 RSA Data Security, Inc. ** +** ******************************************************************** +*/ + +/* MDstruct is the data structure for a message digest computation. +*/ +typedef struct { + unsigned int buffer[4]; /* Holds 4-word result of MD computation */ + unsigned char count[8]; /* Number of bits processed so far */ + unsigned int done; /* Nonzero means MD computation finished */ +} MDstruct, *MDptr; + +/* MDbegin(MD) +** Input: MD -- an MDptr +** Initialize the MDstruct prepatory to doing a message digest +** computation. +*/ +extern void MDbegin(); + +/* MDupdate(MD,X,count) +** Input: MD -- an MDptr +** X -- a pointer to an array of unsigned characters. +** count -- the number of bits of X to use (an unsigned int). +** Updates MD using the first "count" bits of X. +** The array pointed to by X is not modified. +** If count is not a multiple of 8, MDupdate uses high bits of +** last byte. +** This is the basic input routine for a user. +** The routine terminates the MD computation when count < 512, so +** every MD computation should end with one call to MDupdate with a +** count less than 512. Zero is OK for a count. +*/ +extern void MDupdate(); + +/* MDprint(MD) +** Input: MD -- an MDptr +** Prints message digest buffer MD as 32 hexadecimal digits. +** Order is from low-order byte of buffer[0] to high-order byte +** of buffer[3]. +** Each byte is printed with high-order hexadecimal digit first. +*/ +extern void MDprint(); + +/* +** End of md4.h +*/ |
