Botan: src/hash/keccak/keccak.h Source File

Botan 1.10.12

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

- File List
- File Members

keccak.h
Go to the documentation of this file.
1 /*
2 * Keccak
3 * (C) 2010 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_KECCAK_H__
9 #define BOTAN_KECCAK_H__
10
11 #include <botan/hash.h>
12 #include <botan/secmem.h>
13 #include <string>
14
15 namespace Botan {
16
17 /**
18 * Keccak[1600], a SHA-3 candidate
19 */
20 class BOTAN_DLL Keccak_1600 : public HashFunction
21 {
22 public:
23
24 /**
25 * @param output_bits the size of the hash output; must be one of
26 * 224, 256, 384, or 512
27 */
28 Keccak_1600(size_t output_bits = 512);
29
30 size_t hash_block_size() const { return bitrate / 8; }
31 size_t output_length() const { return output_bits / 8; }
32
33 HashFunction* clone() const;
34 std::string name() const;
35 void clear();
36 private:
37 void add_data(const byte input[], size_t length);
38 void final_result(byte out[]);
39
40 size_t output_bits, bitrate;
41 SecureVector<u64bit> S;
42 size_t S_pos;
43 };
44
45 }
46
47 #endif
Botan::Keccak_1600::output_length
size_t output_length() const
Definition: keccak.h:31
Botan::byte
unsigned char byte
Definition: types.h:22
Botan
Definition: algo_base.h:14
Botan::HashFunction
Definition: hash.h:20
Botan::Keccak_1600::hash_block_size
size_t hash_block_size() const
Definition: keccak.h:30
Botan::SecureVector< u64bit >
Botan::Keccak_1600
Definition: keccak.h:20