Botan
1.10.17
src
checksum
crc24
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
13
namespace
Botan
{
14
15
/**
16
* 24-bit cyclic redundancy check
17
*/
18
class
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
Botan::CRC24::~CRC24
~CRC24()
Definition
crc24.h:28
Botan::CRC24::CRC24
CRC24()
Definition
crc24.h:27
Botan::CRC24::name
std::string name() const
Definition
crc24.h:21
Botan::CRC24::output_length
size_t output_length() const
Definition
crc24.h:22
Botan::CRC24::clone
HashFunction * clone() const
Definition
crc24.h:23
Botan::CRC24::clear
void clear()
Definition
crc24.h:25
Botan::HashFunction
Definition
hash.h:22
Botan
Definition
algo_base.h:14
Botan::u32bit
unsigned int u32bit
Definition
types.h:32
Generated by
1.18.0