#include <crc32hash.h>
Inheritance diagram for CRC32Hash:
Public Member Functions | |
CRC32Hash () | |
Constructor for CRC32 checksum. | |
~CRC32Hash () | |
Destructor cleans up the hash state. | |
const Parameters * | GetPar () const |
Get parameters of this hash algo; see base clas. | |
uint64 | FedBytes () const |
Returns number of fed bytes; see base class. | |
void | reset () |
Reset has algo; see base class. | |
void | feed (const char *buf, size_t len) |
Feed the hash algo with data; see base class. | |
void | final () |
Finish hash computation; see base class. | |
void | GetHash (char *buf) const |
Get current has value; see base class. | |
Static Public Attributes | |
const Parameters | par |
Parameters of the hash algo. | |
Private Member Functions | |
CRC32Hash (const CRC32Hash &) | |
Do not use these:. | |
void | operator= (const CRC32Hash &) |
Private Attributes | |
uint32 | state |
hash status; hash value | |
Static Private Attributes | |
const uint32 | crc32table [256] |
1kb CRC precomputed table. This is static and used read-only. |
This implementation of the class uses an internal CRC32 hash table of the size 1024 bytes. However, the table is const and static (compiled-in) [i.e. thread-safe].
NOTE: This class is NOT "C++-safe" and you should generally be careful with cryptographic data, so it is best to manage (de)allocation of these objects in a higher order.
Definition at line 52 of file crc32hash.h.
|
Do not use these:.
|
|
Constructor for CRC32 checksum.
Definition at line 70 of file crc32hash.h. References reset(). |
|
Destructor cleans up the hash state.
Definition at line 73 of file crc32hash.h. References reset(). |
|
Returns number of fed bytes; see base class.
Reimplemented from SecureHashBase. Definition at line 81 of file crc32hash.h. References uint64. |
|
Feed the hash algo with data; see base class.
Reimplemented from SecureHashBase. Definition at line 136 of file crc32hash.cc. |
|
Finish hash computation; see base class.
Reimplemented from SecureHashBase. Definition at line 148 of file crc32hash.cc. |
|
Get current has value; see base class.
Reimplemented from SecureHashBase. Definition at line 115 of file crc32hash.cc. |
|
Get parameters of this hash algo; see base clas.
Reimplemented from SecureHashBase. Definition at line 77 of file crc32hash.h. References par. |
|
|
|
Reset has algo; see base class.
Reimplemented from SecureHashBase. Definition at line 126 of file crc32hash.cc. References Assert, crc32table, and state. Referenced by CRC32Hash(), and ~CRC32Hash(). |
|
1kb CRC precomputed table. This is static and used read-only.
Definition at line 35 of file crc32hash.cc. Referenced by reset(). |
|
Initial value: { INIT_FIELD(hash_size) 4, INIT_FIELD(block_size) 4, INIT_FIELD(hash_ID) 0x3000, INIT_FIELD(name) "CRC32" }
Reimplemented from SecureHashBase. Definition at line 27 of file crc32hash.cc. Referenced by GetPar(). |
|
hash status; hash value
Definition at line 59 of file crc32hash.h. |