monotone

monotone Mtn Source Tree

Root/botan/mdx_hash.h

1/*************************************************
2* MDx Hash Function Header File *
3* (C) 1999-2007 The Botan Project *
4*************************************************/
5
6#ifndef BOTAN_MDX_BASE_H__
7#define BOTAN_MDX_BASE_H__
8
9#include <botan/base.h>
10
11namespace Botan {
12
13/*************************************************
14* MDx Hash Function Base Class *
15*************************************************/
16class MDx_HashFunction : public HashFunction
17 {
18 public:
19 MDx_HashFunction(u32bit, u32bit, bool, bool, u32bit = 8);
20 virtual ~MDx_HashFunction() {}
21 protected:
22 void clear() throw();
23 SecureVector<byte> buffer;
24 u64bit count;
25 u32bit position;
26 private:
27 void add_data(const byte[], u32bit);
28 void final_result(byte output[]);
29
30 virtual void hash(const byte[]) = 0;
31 virtual void copy_out(byte[]) = 0;
32 virtual void write_count(byte[]);
33
34 const bool BIG_BYTE_ENDIAN, BIG_BIT_ENDIAN;
35 const u32bit COUNT_SIZE;
36 };
37
38}
39
40#endif

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status