monotone

monotone Mtn Source Tree

Root/botan/crc32.h

1/*************************************************
2* CRC32 Header File *
3* (C) 1999-2005 The Botan Project *
4*************************************************/
5
6#ifndef BOTAN_CRC32_H__
7#define BOTAN_CRC32_H__
8
9#include <botan/base.h>
10
11namespace Botan {
12
13/*************************************************
14* CRC32 *
15*************************************************/
16class CRC32 : public HashFunction
17 {
18 public:
19 void clear() throw() { crc = 0xFFFFFFFF; }
20 std::string name() const { return "CRC32"; }
21 HashFunction* clone() const { return new CRC32; }
22 CRC32() : HashFunction(4) { clear(); }
23 ~CRC32() { clear(); }
24 private:
25 void add_data(const byte[], u32bit);
26 void final_result(byte[]);
27 u32bit crc;
28 };
29
30}
31
32#endif

Archive Download this file

Branches

Tags

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