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
13namespace Botan {
14
15/**
16* Whirlpool
17*/
18class 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
MDx_HashFunction(size_t block_length, bool big_byte_endian, bool big_bit_endian, size_t counter_size=8)
Definition mdx_hash.cpp:17
HashFunction * clone() const
Definition whrlpool.h:23
size_t output_length() const
Definition whrlpool.h:22
std::string name() const
Definition whrlpool.h:21
unsigned long long u64bit
Definition types.h:49