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

Botan 1.10.16

tiger.h
Go to the documentation of this file.
1 /*
2 * Tiger
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_TIGER_H__
9 #define BOTAN_TIGER_H__
10
11 #include <botan/mdx_hash.h>
12
13 namespace Botan {
14
15 /**
16 * Tiger
17 */
18 class BOTAN_DLL Tiger : public MDx_HashFunction
19 {
20 public:
21 std::string name() const;
22 size_t output_length() const { return hash_len; }
23
24 HashFunction* clone() const
25 {
26 return new Tiger(output_length(), passes);
27 }
28
29 void clear();
30
31 /**
32 * @param out_size specifies the output length; can be 16, 20, or 24
33 * @param passes to make in the algorithm
34 */
35 Tiger(size_t out_size = 24, size_t passes = 3);
36 private:
37 void compress_n(const byte[], size_t block);
38 void copy_out(byte[]);
39
40 static void pass(u64bit& A, u64bit& B, u64bit& C,
41 const MemoryRegion<u64bit>& M,
42 byte mul);
43
44 static const u64bit SBOX1[256];
45 static const u64bit SBOX2[256];
46 static const u64bit SBOX3[256];
47 static const u64bit SBOX4[256];
48
49 SecureVector<u64bit> X, digest;
50 const size_t hash_len, passes;
51 };
52
53 }
54
55 #endif
Botan::Tiger
Definition: tiger.h:18
Botan::Tiger::output_length
size_t output_length() const
Definition: tiger.h:22
Botan::byte
unsigned char byte
Definition: types.h:22
Botan::Tiger::clone
HashFunction * clone() const
Definition: tiger.h:24
Botan::u64bit
unsigned long long u64bit
Definition: types.h:49
Botan::MDx_HashFunction
Definition: mdx_hash.h:18
Botan::MemoryRegion< u64bit >
Botan
Definition: algo_base.h:14
Botan::HashFunction
Definition: hash.h:20
Botan::SecureVector< u64bit >