aboutsummaryrefslogtreecommitdiffstats
path: root/src/pluto/sha1.h
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2006-04-28 10:51:19 +0000
committerMartin Willi <martin@strongswan.org>2006-04-28 10:51:19 +0000
commit1029d84d2365ca6e6b2d2a96e5c0a1fad3c127e3 (patch)
treed7d1152d0651f01f023b4faa09fc51f936f89e60 /src/pluto/sha1.h
parent51c3484a9f70f03b2ea73151428a40e785c0c56c (diff)
downloadstrongswan-1029d84d2365ca6e6b2d2a96e5c0a1fad3c127e3.tar.bz2
strongswan-1029d84d2365ca6e6b2d2a96e5c0a1fad3c127e3.tar.xz
Diffstat (limited to 'src/pluto/sha1.h')
-rw-r--r--src/pluto/sha1.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/pluto/sha1.h b/src/pluto/sha1.h
new file mode 100644
index 000000000..64b3d2f5d
--- /dev/null
+++ b/src/pluto/sha1.h
@@ -0,0 +1,16 @@
+/*
+SHA-1 in C
+By Steve Reid <steve@edmweb.com>
+100% Public Domain
+*/
+
+typedef struct {
+ u_int32_t state[5];
+ u_int32_t count[2];
+ unsigned char buffer[64];
+} SHA1_CTX;
+
+void SHA1Transform(u_int32_t state[5], const unsigned char buffer[64]);
+void SHA1Init(SHA1_CTX* context);
+void SHA1Update(SHA1_CTX* context, const unsigned char* data, u_int32_t len);
+void SHA1Final(unsigned char digest[20], SHA1_CTX* context);