summaryrefslogtreecommitdiff
path: root/mdfour.h
diff options
context:
space:
mode:
Diffstat (limited to 'mdfour.h')
-rw-r--r--mdfour.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/mdfour.h b/mdfour.h
new file mode 100644
index 0000000..c196a09
--- /dev/null
+++ b/mdfour.h
@@ -0,0 +1,19 @@
+#ifndef MDFOUR_H
+#define MDFOUR_H
+
+#include <stddef.h>
+#include <inttypes.h>
+
+struct mdfour {
+ uint32_t A, B, C, D;
+ size_t totalN;
+ unsigned char tail[64];
+ size_t tail_len;
+ int finalized;
+};
+
+void mdfour_begin(struct mdfour *md);
+void mdfour_update(struct mdfour *md, const unsigned char *in, size_t n);
+void mdfour_result(struct mdfour *md, unsigned char *out);
+
+#endif