aboutsummaryrefslogtreecommitdiffstats
path: root/src/ssl/tls_handshake_hash.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-09-15 14:20:38 +0000
committerlloyd <[email protected]>2010-09-15 14:20:38 +0000
commitd432647483aa74c97460eb065f2b11fd82fc9177 (patch)
tree8fae2888ff5c18ab87fbf0c5c63a7e35b5db76a7 /src/ssl/tls_handshake_hash.h
parent72ba429aa2550d12b13ce321a567601bddf7c665 (diff)
Hide a number of the internal SSL headers from the user, you can still
see too much but better than before.
Diffstat (limited to 'src/ssl/tls_handshake_hash.h')
-rw-r--r--src/ssl/tls_handshake_hash.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/ssl/tls_handshake_hash.h b/src/ssl/tls_handshake_hash.h
new file mode 100644
index 000000000..4c145c6c6
--- /dev/null
+++ b/src/ssl/tls_handshake_hash.h
@@ -0,0 +1,40 @@
+/*
+* 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 += std::make_pair(in, length); }
+
+ void update(const MemoryRegion<byte>& in)
+ { data += in; }
+
+ void update(byte in)
+ { data.push_back(in); }
+
+ SecureVector<byte> final();
+ SecureVector<byte> final_ssl3(const MemoryRegion<byte>&);
+ private:
+ SecureVector<byte> data;
+ };
+
+}
+
+#endif