Botan: src/checksum/crc32/crc32.h Source File

Botan 1.10.12

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

crc32.h
Go to the documentation of this file.
1 /*
2 * CRC32
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_CRC32_H__
9 #define BOTAN_CRC32_H__
10
11 #include <botan/hash.h>
12
13 namespace Botan {
14
15 /**
16 * 32-bit cyclic redundancy check
17 */
18 class BOTAN_DLL CRC32 : public HashFunction
19 {
20 public:
21 std::string name() const { return "CRC32"; }
22 size_t output_length() const { return 4; }
23 HashFunction* clone() const { return new CRC32; }
24
25 void clear() { crc = 0xFFFFFFFF; }
26
27 CRC32() { clear(); }
28 ~CRC32() { 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
Botan::CRC32::clear
void clear()
Definition: crc32.h:25
Botan::CRC32::output_length
size_t output_length() const
Definition: crc32.h:22
Botan::CRC32::~CRC32
~CRC32()
Definition: crc32.h:28
Botan::byte
unsigned char byte
Definition: types.h:22
Botan::CRC32::CRC32
CRC32()
Definition: crc32.h:27
Botan::CRC32
Definition: crc32.h:18
Botan::CRC32::name
std::string name() const
Definition: crc32.h:21
Botan
Definition: algo_base.h:14
Botan::HashFunction
Definition: hash.h:20
Botan::CRC32::clone
HashFunction * clone() const
Definition: crc32.h:23
Botan::u32bit
unsigned int u32bit
Definition: types.h:32