Botan: src/mac/ssl3mac/ssl3_mac.h Source File

Botan 1.10.12

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

ssl3_mac.h
Go to the documentation of this file.
1 /*
2 * SSL3-MAC
3 * (C) 1999-2004 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_SSL3_MAC_H__
9 #define BOTAN_SSL3_MAC_H__
10
11 #include <botan/hash.h>
12 #include <botan/mac.h>
13
14 namespace Botan {
15
16 /**
17 * A MAC only used in SSLv3. Do not use elsewhere! Use HMAC instead.
18 */
19 class BOTAN_DLL SSL3_MAC : public MessageAuthenticationCode
20 {
21 public:
22 std::string name() const;
23 size_t output_length() const { return hash->output_length(); }
24 MessageAuthenticationCode* clone() const;
25
26 void clear();
27
28 Key_Length_Specification key_spec() const
29 {
30 return Key_Length_Specification(hash->output_length());
31 }
32
33 /**
34 * @param hash the underlying hash to use
35 */
36 SSL3_MAC(HashFunction* hash);
37 ~SSL3_MAC() { delete hash; }
38 private:
39 void add_data(const byte[], size_t);
40 void final_result(byte[]);
41 void key_schedule(const byte[], size_t);
42
43 HashFunction* hash;
44 SecureVector<byte> i_key, o_key;
45 };
46
47 }
48
49 #endif
Botan::SSL3_MAC::output_length
size_t output_length() const
Definition: ssl3_mac.h:23
Botan::Key_Length_Specification
Definition: key_spec.h:18
Botan::MessageAuthenticationCode
Definition: mac.h:20
Botan::SSL3_MAC::~SSL3_MAC
~SSL3_MAC()
Definition: ssl3_mac.h:37
Botan::byte
unsigned char byte
Definition: types.h:22
Botan::SSL3_MAC::key_spec
Key_Length_Specification key_spec() const
Definition: ssl3_mac.h:28
Botan
Definition: algo_base.h:14
Botan::HashFunction
Definition: hash.h:20
Botan::SecureVector< byte >
Botan::SSL3_MAC
Definition: ssl3_mac.h:19