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

Botan 1.10.17

md2.h
Go to the documentation of this file.
1 /*
2 * MD2
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_MD2_H__
9 #define BOTAN_MD2_H__
10
11 #include <botan/hash.h>
12
13 namespace Botan {
14
15 /**
16 * MD2
17 */
18 class BOTAN_DLL MD2 : public HashFunction
19 {
20 public:
21 std::string name() const { return "MD2"; }
22 size_t output_length() const { return 16; }
23 size_t hash_block_size() const { return 16; }
24 HashFunction* clone() const { return new MD2; }
25
26 void clear();
27
28 MD2() : X(48), checksum(16), buffer(16)
29 { clear(); }
30 private:
31 void add_data(const byte[], size_t);
32 void hash(const byte[]);
33 void final_result(byte[]);
34
35 SecureVector<byte> X, checksum, buffer;
36 size_t position;
37 };
38
39 }
40
41 #endif
Botan::MD2::hash_block_size
size_t hash_block_size() const
Definition: md2.h:23
Botan::MD2::MD2
MD2()
Definition: md2.h:28
Botan::MD2::clone
HashFunction * clone() const
Definition: md2.h:24
Botan::MD2
Definition: md2.h:18
Botan::byte
unsigned char byte
Definition: types.h:22
Botan::MD2::output_length
size_t output_length() const
Definition: md2.h:22
Botan
Definition: algo_base.h:14
Botan::HashFunction
Definition: hash.h:20
Botan::SecureVector< byte >
Botan::MD2::name
std::string name() const
Definition: md2.h:21