summaryrefslogtreecommitdiffstats
path: root/source/md4.h
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1996-05-04 07:50:46 +0000
committerSamba Release Account <samba-bugs@samba.org>1996-05-04 07:50:46 +0000
commit291551d80711daab7b7581720bcd9a08d6096517 (patch)
tree2bda16b586bd019b0a75e6188132ac81dbb9e3f1 /source/md4.h
downloadsamba-291551d80711daab7b7581720bcd9a08d6096517.tar.gz
samba-291551d80711daab7b7581720bcd9a08d6096517.tar.xz
samba-291551d80711daab7b7581720bcd9a08d6096517.zip
Initial version imported to CVS
Diffstat (limited to 'source/md4.h')
-rw-r--r--source/md4.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/source/md4.h b/source/md4.h
new file mode 100644
index 00000000000..3f60d75fe3c
--- /dev/null
+++ b/source/md4.h
@@ -0,0 +1,58 @@
+/*
+ This code is from rfc1186.
+*/
+
+ /*
+ ** ********************************************************************
+ ** 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
+ */