Botan 1.10.17
crc24.h
Go to the documentation of this file.
1/*
2* CRC24
3* (C) 1999-2007 Jack Lloyd
4*
5* Distributed under the terms of the Botan license
6*/
7
8#ifndef BOTAN_CRC24_H__
9#define BOTAN_CRC24_H__
10
11#include <botan/hash.h>
12
13namespace Botan {
14
15/**
16* 24-bit cyclic redundancy check
17*/
18class BOTAN_DLL CRC24 : public HashFunction
19 {
20 public:
21 std::string name() const { return "CRC24"; }
22 size_t output_length() const { return 3; }
23 HashFunction* clone() const { return new CRC24; }
24
25 void clear() { crc = 0xB704CE; }
26
27 CRC24() { clear(); }
28 ~CRC24() { clear(); }
29 private:
30 void add_data(const byte[], size_t);
31 void final_result(byte[]);
32 u32bit crc;
33 };
34
35}
36
37#endif
std::string name() const
Definition crc24.h:21
size_t output_length() const
Definition crc24.h:22
HashFunction * clone() const
Definition crc24.h:23
void clear()
Definition crc24.h:25
unsigned int u32bit
Definition types.h:32