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
13namespace Botan {
14
15/**
16* HAS-160, a Korean hash function standardized in
17* TTAS.KO-12.0011/R1. Used in conjuction with KCDSA
18*/
19class 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
size_t output_length() const
Definition has160.h:23
std::string name() const
Definition has160.h:22
HashFunction * clone() const
Definition has160.h:24
MDx_HashFunction(size_t block_length, bool big_byte_endian, bool big_bit_endian, size_t counter_size=8)
Definition mdx_hash.cpp:17