summaryrefslogtreecommitdiffstats
path: root/sha1.h
diff options
context:
space:
mode:
Diffstat (limited to 'sha1.h')
-rw-r--r--sha1.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sha1.h b/sha1.h
new file mode 100644
index 0000000..35fe4bb
--- /dev/null
+++ b/sha1.h
@@ -0,0 +1,15 @@
+#ifndef REPREPRO_SHA1_H
+#define REPREPRO_SHA1_H
+
+struct SHA1_Context {
+ uint32_t state[5];
+ uint64_t count;
+ uint8_t buffer[64];
+};
+#define SHA1_DIGEST_SIZE 20
+
+void SHA1Init(/*@out@*/struct SHA1_Context *context);
+void SHA1Update(struct SHA1_Context *context, const uint8_t *data, const size_t len);
+void SHA1Final(struct SHA1_Context *context, /*@out@*/uint8_t digest[SHA1_DIGEST_SIZE]);
+
+#endif