Botan: src/ssl/tls_handshake_hash.h Source File

Botan 1.10.16

tls_handshake_hash.h
Go to the documentation of this file.
1 /*
2 * TLS Handshake Hash
3 * (C) 2004-2006 Jack Lloyd
4 *
5 * Released under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_TLS_HANDSHAKE_HASH_H__
9 #define BOTAN_TLS_HANDSHAKE_HASH_H__
10
11 #include <botan/secmem.h>
12
13 namespace Botan {
14
15 using namespace Botan;
16
17 /**
18 * TLS Handshake Hash
19 */
20 class HandshakeHash
21 {
22 public:
23 void update(const byte in[], size_t length)
24 { data += std::make_pair(in, length); }
25
26 void update(const MemoryRegion<byte>& in)
27 { data += in; }
28
29 void update(byte in)
30 { data.push_back(in); }
31
32 SecureVector<byte> final();
33 SecureVector<byte> final_ssl3(const MemoryRegion<byte>&);
34 private:
35 SecureVector<byte> data;
36 };
37
38 }
39
40 #endif
Botan::MemoryRegion::push_back
void push_back(T x)
Definition: secmem.h:143
Botan::byte
unsigned char byte
Definition: types.h:22
Botan::HandshakeHash::update
void update(const byte in[], size_t length)
Definition: tls_handshake_hash.h:23
Botan::MemoryRegion< byte >
Botan
Definition: algo_base.h:14
Botan::HandshakeHash::final_ssl3
SecureVector< byte > final_ssl3(const MemoryRegion< byte > &)
Definition: tls_handshake_hash.cpp:35
Botan::HandshakeHash::update
void update(const MemoryRegion< byte > &in)
Definition: tls_handshake_hash.h:26
Botan::HandshakeHash
Definition: tls_handshake_hash.h:20
Botan::SecureVector< byte >
Botan::HandshakeHash::update
void update(byte in)
Definition: tls_handshake_hash.h:29