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

Botan 1.10.17

gost_3411.h
Go to the documentation of this file.
1 /*
2 * GOST 34.11
3 * (C) 2009 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_GOST_3411_H__
9 #define BOTAN_GOST_3411_H__
10
11 #include <botan/hash.h>
12 #include <botan/gost_28147.h>
13
14 namespace Botan {
15
16 /**
17 * GOST 34.11
18 */
19 class BOTAN_DLL GOST_34_11 : public HashFunction
20 {
21 public:
22 std::string name() const { return "GOST-R-34.11-94" ; }
23 size_t output_length() const { return 32; }
24 size_t hash_block_size() const { return 32; }
25 HashFunction* clone() const { return new GOST_34_11; }
26
27 void clear();
28
29 GOST_34_11();
30 private:
31 void compress_n(const byte input[], size_t blocks);
32
33 void add_data(const byte[], size_t);
34 void final_result(byte[]);
35
36 GOST_28147_89 cipher;
37 SecureVector<byte> buffer, sum, hash;
38 size_t position;
39 u64bit count;
40 };
41
42 }
43
44 #endif
Botan::GOST_34_11::output_length
size_t output_length() const
Definition: gost_3411.h:23
Botan::GOST_28147_89
Definition: gost_28147.h:52
Botan::byte
unsigned char byte
Definition: types.h:22
Botan::u64bit
unsigned long long u64bit
Definition: types.h:49
Botan::GOST_34_11
Definition: gost_3411.h:19
Botan::GOST_34_11::clone
HashFunction * clone() const
Definition: gost_3411.h:25
Botan
Definition: algo_base.h:14
Botan::HashFunction
Definition: hash.h:20
Botan::SecureVector< byte >
Botan::GOST_34_11::name
std::string name() const
Definition: gost_3411.h:22
Botan::GOST_34_11::hash_block_size
size_t hash_block_size() const
Definition: gost_3411.h:24