Botan
1.10.17
src
hash
whirlpool
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::HashFunction
Definition
hash.h:22
Botan::MDx_HashFunction::MDx_HashFunction
MDx_HashFunction(size_t block_length, bool big_byte_endian, bool big_bit_endian, size_t counter_size=8)
Definition
mdx_hash.cpp:17
Botan::SecureVector
Definition
secmem.h:329
Botan::Whirlpool::clone
HashFunction * clone() const
Definition
whrlpool.h:23
Botan::Whirlpool::output_length
size_t output_length() const
Definition
whrlpool.h:22
Botan::Whirlpool::name
std::string name() const
Definition
whrlpool.h:21
Botan::Whirlpool::clear
void clear()
Definition
whrlpool.cpp:139
Botan::Whirlpool::Whirlpool
Whirlpool()
Definition
whrlpool.h:27
Botan
Definition
algo_base.h:14
Botan::u64bit
unsigned long long u64bit
Definition
types.h:49
Generated by
1.18.0