Botan: src/hash/whirlpool/whrlpool.h Source File

Botan 1.10.17

whrlpool.h
Go to the documentation of this file.
1 /*
2 * Whirlpool
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_WHIRLPOOL_H__
9 #define BOTAN_WHIRLPOOL_H__
10
11 #include <botan/mdx_hash.h>
12
13 namespace Botan {
14
15 /**
16 * Whirlpool
17 */
18 class BOTAN_DLL Whirlpool : public MDx_HashFunction
19 {
20 public:
21 std::string name() const { return "Whirlpool"; }
22 size_t output_length() const { return 64; }
23 HashFunction* clone() const { return new Whirlpool; }
24
25 void clear();
26
27 Whirlpool() : MDx_HashFunction(64, true, true, 32), M(8), digest(8)
28 { clear(); }
29 private:
30 void compress_n(const byte[], size_t blocks);
31 void copy_out(byte[]);
32
33 static const u64bit C0[256];
34 static const u64bit C1[256];
35 static const u64bit C2[256];
36 static const u64bit C3[256];
37 static const u64bit C4[256];
38 static const u64bit C5[256];
39 static const u64bit C6[256];
40 static const u64bit C7[256];
41
42 SecureVector<u64bit> M, digest;
43 };
44
45 }
46
47 #endif
Botan::Whirlpool::name
std::string name() const
Definition: whrlpool.h:21
Botan::Whirlpool::output_length
size_t output_length() const
Definition: whrlpool.h:22
Botan::Whirlpool::clone
HashFunction * clone() const
Definition: whrlpool.h:23
Botan::byte
unsigned char byte
Definition: types.h:22
Botan::u64bit
unsigned long long u64bit
Definition: types.h:49
Botan::Whirlpool::Whirlpool
Whirlpool()
Definition: whrlpool.h:27
Botan::MDx_HashFunction
Definition: mdx_hash.h:18
Botan
Definition: algo_base.h:14
Botan::Whirlpool
Definition: whrlpool.h:18
Botan::HashFunction
Definition: hash.h:20
Botan::SecureVector< u64bit >