aboutsummaryrefslogtreecommitdiffstats
path: root/src/ssl/handshake_hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ssl/handshake_hash.h')
-rw-r--r--src/ssl/handshake_hash.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/ssl/handshake_hash.h b/src/ssl/handshake_hash.h
new file mode 100644
index 000000000..cfb351765
--- /dev/null
+++ b/src/ssl/handshake_hash.h
@@ -0,0 +1,38 @@
+/**
+* TLS Handshake Hash
+* (C) 2004-2006 Jack Lloyd
+*
+* Released under the terms of the Botan license
+*/
+
+#ifndef BOTAN_TLS_HANDSHAKE_HASH_H__
+#define BOTAN_TLS_HANDSHAKE_HASH_H__
+
+#include <botan/secmem.h>
+
+namespace Botan {
+
+using namespace Botan;
+
+/**
+* TLS Handshake Hash
+*/
+class BOTAN_DLL HandshakeHash
+ {
+ public:
+ void update(const byte in[], u32bit length)
+ { data.append(in, length); }
+ void update(const MemoryRegion<byte>& in)
+ { update(in.begin(), in.size()); }
+ void update(byte in)
+ { update(&in, 1); }
+
+ SecureVector<byte> final();
+ SecureVector<byte> final_ssl3(const MemoryRegion<byte>&);
+ private:
+ SecureVector<byte> data;
+ };
+
+}
+
+#endif