diff options
author | lloyd <[email protected]> | 2010-02-23 21:40:24 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-02-23 21:40:24 +0000 |
commit | 9137016d1bfac98b5fb88026d7cf3c965ff66f0e (patch) | |
tree | 8169d424b2f5fdb79344aa6876794f14c965bfdc /src/ssl/handshake_hash.h | |
parent | 7347916cb685582d5f2b5fee4b518d0d1d4995ca (diff) | |
parent | 965b6e302ff0f2549c3b53a61897b306684cb4e7 (diff) |
propagate from branch 'net.randombit.botan' (head 89451dd9349d61bc29507c9c441c090148192286)
to branch 'net.randombit.botan.ssl' (head a341d74655f579482102c23e2c378897b738bd06)
Diffstat (limited to 'src/ssl/handshake_hash.h')
-rw-r--r-- | src/ssl/handshake_hash.h | 38 |
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 |