aboutsummaryrefslogtreecommitdiff
path: root/sha1.h
diff options
context:
space:
mode:
authorSimon Quigley <tsimonq2@ubuntu.com>2017-06-19 14:38:33 -0500
committerSimon Quigley <tsimonq2@ubuntu.com>2017-06-19 14:38:33 -0500
commit854292407779593a401a1d5ce71add51880fa84f (patch)
tree42b5f1896eda603c04a30db1effb133f10f71ca8 /sha1.h
parenta08438bda21b3e0d7db2db2360d040841970104d (diff)
Import Upstream version 0.4
Diffstat (limited to 'sha1.h')
-rw-r--r--sha1.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/sha1.h b/sha1.h
new file mode 100644
index 00000000..83f28df7
--- /dev/null
+++ b/sha1.h
@@ -0,0 +1,21 @@
+/*
+ * SHA-1 in C
+ * By Steve Reid <steve@edmweb.com>
+ * 100% Public Domain
+ */
+
+#ifndef __SHA1_H__
+#define __SHA1_H__
+
+typedef struct {
+ unsigned long state[5];
+ unsigned long count[2];
+ unsigned char buffer[64];
+} SHA1_CTX;
+
+void SHA1Transform(unsigned long state[5], unsigned char buffer[64]);
+void SHA1Init(SHA1_CTX* context);
+void SHA1Update(SHA1_CTX* context, unsigned char* data, unsigned int len);
+void SHA1Final(unsigned char digest[20], SHA1_CTX* context);
+
+#endif /* __SHA1_H__ */