NCBI C++ ToolKit
|
Search Toolkit Book for CChecksumBase
CChecksumBase – Base class with auxiliary methods for CHash and CChecksum. More...
#include <util/checksum.hpp>
Public Member Functions | |
CChecksumBase (EMethodDef method) | |
Default constructor. More... | |
~CChecksumBase () | |
Destructor. More... | |
CChecksumBase (const CChecksumBase &other) | |
Copy constructor. More... | |
CChecksumBase & | operator= (const CChecksumBase &other) |
Assignment operator. More... | |
size_t | GetSize (void) const |
Return size of checksum/hash in bytes, depending on used method. More... | |
size_t | GetBits (void) const |
Return size of checksum/hash in bits (32, 64). More... | |
Uint4 | GetResult32 (void) const |
Return calculated result. More... | |
Uint8 | GetResult64 (void) const |
Return calculated result. More... | |
string | GetResultHex (void) const |
Return string with checksum/hash in hexadecimal form. More... | |
EMethodDef | x_GetMethod (void) const |
Static Public Member Functions | |
static void | InitTables (void) |
Initialize static tables used in CRC32 calculation. More... | |
static void | PrintTables (CNcbiOstream &out) |
Print C++ code for CRC32 tables for direct inclusion into library. More... | |
Protected Types | |
enum | EMethodDef { eNone , eCRC32 , eCRC32ZIP , eCRC32INSD , eCRC32CKSUM , eCRC32C , eAdler32 , eMD5 , eCityHash32 , eCityHash64 , eFarmHash32 , eFarmHash64 , eMurmurHash2_32 , eMurmurHash2_64 , eMurmurHash3_32 } |
All supported methods for CHash and CCheksum. More... | |
Protected Member Functions | |
void | x_Update (const char *str, size_t len) |
Update current control sum with data provided. More... | |
void | x_Reset (EMethodDef method) |
Reset the object to prepare it to the next computation using selected method. More... | |
void | x_Free (void) |
Cleanup (used in destructor and assignment operator). More... | |
Protected Attributes | |
EMethodDef | m_Method |
Current method. More... | |
size_t | m_CharCount |
Number of processed chars. More... | |
union { | |
Uint4 CChecksumBase::v32 | |
Used to store 32-bit results. More... | |
Uint8 CChecksumBase::v64 | |
Used to store 64-bit results. More... | |
CMD5 * CChecksumBase::md5 | |
Used for MD5 calculation. More... | |
} | m_Value |
Checksum/Hash computation result. More... | |
Static Protected Attributes | |
static Uint8 | m_Seed = 0 |
Unique seed used by some hash methods. More... | |
CChecksumBase – Base class with auxiliary methods for CHash and CChecksum.
Definition at line 54 of file checksum.hpp.