Botan  1.10.9
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 */
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();
34  private:
35  SecureVector<byte> data;
36  };
37 
38 }
39 
40 #endif
void push_back(T x)
Definition: secmem.h:143
unsigned char byte
Definition: types.h:22
void update(const byte in[], size_t length)
SecureVector< byte > final_ssl3(const MemoryRegion< byte > &)
void update(const MemoryRegion< byte > &in)