Botan 1.10.17

has160.h
Go to the documentation of this file.
1 /*
2 * HAS-160
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_HAS_160_H__
9 #define BOTAN_HAS_160_H__
10
11 #include <botan/mdx_hash.h>
12
13 namespace Botan {
14
15 /**
16 * HAS-160, a Korean hash function standardized in
17 * TTAS.KO-12.0011/R1. Used in conjuction with KCDSA
18 */
19 class BOTAN_DLL HAS_160 : public MDx_HashFunction
20 {
21 public:
22 std::string name() const { return "HAS-160"; }
23 size_t output_length() const { return 20; }
24 HashFunction* clone() const { return new HAS_160; }
25
26 void clear();
27
28 HAS_160() : MDx_HashFunction(64, false, true), X(20), digest(5)
29 { clear(); }
30 private:
31 void compress_n(const byte[], size_t blocks);
32 void copy_out(byte[]);
33
34 SecureVector<u32bit> X, digest;
35 };
36
37 }
38
39 #endif
Botan::HAS_160::clone
HashFunction * clone() const
Definition: has160.h:24
Botan::HAS_160::HAS_160
HAS_160()
Definition: has160.h:28
Botan::HAS_160::output_length
size_t output_length() const
Definition: has160.h:23
Botan::byte
unsigned char byte
Definition: types.h:22
Botan::MDx_HashFunction
Definition: mdx_hash.h:18
Botan
Definition: algo_base.h:14
Botan::HashFunction
Definition: hash.h:20
Botan::HAS_160::name
std::string name() const
Definition: has160.h:22
Botan::HAS_160
Definition: has160.h:19
Botan::SecureVector< u32bit >