summaryrefslogtreecommitdiff
path: root/mdfour.h
diff options
context:
space:
mode:
authorJeongho Hwang <jbera.hwang@samsung.com>2012-09-19 13:15:55 +0900
committerJeongho Hwang <jbera.hwang@samsung.com>2012-09-19 13:15:55 +0900
commitc8b261d409e1cfebcc26539c58530479c531732f (patch)
treebd3365fbecb87b018ceca8bc8ef24b5db63e2ae6 /mdfour.h
parent3c73bcec3308588a22bf7596adaa990942215db4 (diff)
downloadccache-c8b261d409e1cfebcc26539c58530479c531732f.tar.gz
ccache-c8b261d409e1cfebcc26539c58530479c531732f.tar.bz2
ccache-c8b261d409e1cfebcc26539c58530479c531732f.zip
Signed-off-by: Jeongho Hwang <jbera.hwang@samsung.com>
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