summaryrefslogtreecommitdiff
path: root/mdfour.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-02-17 21:28:53 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-02-17 21:28:53 +0000
commit189d7eb970b025c570c7ccce916759083373bdde (patch)
treef4f7c3a71ecc7851a8a7b86206bbb202b5cab551 /mdfour.h
downloadccache-tarball-189d7eb970b025c570c7ccce916759083373bdde.tar.gz
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