aboutsummaryrefslogtreecommitdiff
path: root/src/lib/third_party/include
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2019-09-14 12:38:58 +0200
committerLuca Deri <deri@ntop.org>2019-09-14 12:38:58 +0200
commit659f75138c2a95e5823608a545b9a3d3ced223bc (patch)
treea2677cb7b266db448beaed31c427b75d7269a4ad /src/lib/third_party/include
parentd7c2ced475603228c8999b416719f0cd84b971c7 (diff)
TLS cerficate hash calculation
Diffstat (limited to 'src/lib/third_party/include')
-rw-r--r--src/lib/third_party/include/ndpi_sha1.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/third_party/include/ndpi_sha1.h b/src/lib/third_party/include/ndpi_sha1.h
new file mode 100644
index 000000000..11eab1e51
--- /dev/null
+++ b/src/lib/third_party/include/ndpi_sha1.h
@@ -0,0 +1,17 @@
+/* ================ sha1.h ================ */
+/*
+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);