NCBI C++ ToolKit
|
Classes | |
class | CChecksumBase |
CChecksumBase – Base class with auxiliary methods for CHash and CChecksum. More... | |
class | CHash |
CHash – Hash calculator. More... | |
class | NHash |
NHash –. More... | |
class | CChecksum |
CChecksum – Checksum calculator. More... | |
class | CChecksumException |
CChecksumException –. More... | |
class | CChecksumStreamWriter |
CChecksumStreamWriter –. More... | |
class | CMD5 |
Variables | |
EMethodDef | CChecksumBase::m_Method |
Current method. More... | |
size_t | CChecksumBase::m_CharCount |
Number of processed chars. More... | |
static Uint8 | CChecksumBase::m_Seed = 0 |
Unique seed used by some hash methods. More... | |
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... | |
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... | |
} | CChecksumBase::m_Value |
Checksum/Hash computation result. More... | |
size_t | CChecksum::m_LineCount |
Number of processed lines. More... | |
CChecksum | CChecksumStreamWriter::m_Checksum |
Checksum calculator. More... | |
Uint4 | CMD5::m_Buf [4] |
Int8 | CMD5::m_Bits |
unsigned char | CMD5::m_In [kBlockSize] |
bool | CMD5::m_Finalized |
anonymous enum |
Enumerator | |
---|---|
kMinimumChecksumLength |
Definition at line 316 of file checksum.hpp.
Error types that can be generated.
Enumerator | |
---|---|
eStreamIO | |
eFileIO |
Definition at line 433 of file checksum.hpp.
enum CHash::EMethod |
Method used to compute hash.
Enumerator | |
---|---|
eCRC32 | |
eCRC32ZIP | |
eCRC32INSD | |
eCRC32CKSUM | |
eCRC32C | |
eAdler32 | |
eCityHash32 | |
eCityHash64 | |
eFarmHash32 | |
eFarmHash64 | |
eMurmurHash2_32 | |
eMurmurHash2_64 | |
eMurmurHash3_32 | |
eDefault |
Definition at line 199 of file checksum.hpp.
enum CChecksum::EMethod |
Method used to compute control sum.
Enumerator | |
---|---|
eCRC32 | |
eCRC32ZIP | |
eCRC32INSD | |
eCRC32CKSUM | |
eCRC32C | |
eAdler32 | |
eMD5 | |
eDefault |
Definition at line 306 of file checksum.hpp.
|
protected |
All supported methods for CHash and CCheksum.
Enumerator | |
---|---|
eNone | Undefined (for internal use). |
eCRC32 | 32-bit Cyclic Redundancy Check. Most significant bit first, no inversions. |
eCRC32ZIP | Exact zip CRC32. Same polynomial as eCRC32. Least significant bit are processed first, extra inversions at the beginning and the end. |
eCRC32INSD | Inverted CRC32ZIP. Hash function used in the ID system to verify sequence uniqueness. |
eCRC32CKSUM | CRC32 implemented by cksum utility. Same as eCRC32, but with data length included in CRC, and extra inversion at the end. |
eCRC32C | CRC32C (Castagnoli). Better polynomial used in some places (iSCSI). This method has hardware support in new Intel processors. Least significant bits are processed first, extra inversions at the beginning and the end. |
eAdler32 | A bit faster than CRC32ZIP, not recommended for small data sizes. |
eMD5 | Message Digest version 5. |
eCityHash32 | CityHash, 32-bit result.
|
eCityHash64 | CityHash, 64-bit result. |
eFarmHash32 | FarmHash, 32-bit result.
|
eFarmHash64 | FarmHash, 64-bit result. |
eMurmurHash2_32 | MurmurHash2 for x86, 32-bit result.
|
eMurmurHash2_64 | MurmurHash2 for x64, 64-bit result. |
eMurmurHash3_32 | MurmurHash3 for x86, 32-bit result. |
Definition at line 58 of file checksum.hpp.
|
inline |
Update current control sum with data provided.
Definition at line 602 of file checksum.hpp.
References count, CChecksumBase::m_CharCount, str(), and CChecksumBase::x_Update().
Referenced by CObjFingerprint::AddInteger(), CChecksum::AddLine(), ComputeFileChecksum_deprecated(), CNetService::IterateByWeight(), CFileCode::ModifiedByUser(), CDemoApp::Run(), sx_CalcHash(), CChecksumStreamWriter::Write(), CMD5StreamWriter< Buffer >::Write(), CBGZFFile::x_ReadBlock(), and CSparseGraph::x_ReadMap().
Update checksum with the file data.
On error an exception will be thrown, and the checksum not change.
Definition at line 373 of file checksum.cpp.
References buf, CFileIO_Base::eOpen, CFileIO_Base::eRead, f, n, NCBI_RETHROW, and tmp.
Referenced by CLDS2_UrlHandler_File::GetFileCRC(), NS_GetConfigFileChecksum(), NST_GetConfigFileChecksum(), and s_GetCheckSumForFile().
|
inline |
Definition at line 609 of file checksum.hpp.
References CChecksum::AddChars(), len, and CChecksum::NextLine().
Referenced by CObjFingerprint::AddDouble(), CObjFingerprint::AddInteger(), CChecksum::AddLine(), CCgiRequest::CalcChecksum(), CBedCoverageGraph::CBedCoverageGraph(), CScoreBuilder::ComputeTieBreaker(), CPileUpGraph::CPileUpGraph(), CVcfHeatmap::CVcfHeatmap(), CVcfHistogram::CVcfHistogram(), CFetchURL::Fetch(), CBinsGlyph::GenerateBinSignature(), CGeneMarkerGlyph::GenerateGeneMarkerSignature(), GenerateSignature(), CObjFingerprint::GetAlignSignature(), CObjFingerprint::GetFeatSignature(), CObjFingerprint::GetGraphSignature(), CObjFingerprint::GetHistogramSignature(), CTableDataBase::GetTableTypeId(), GetVideoId(), s_Fingerprint_Byte_graph(), s_Fingerprint_Dbtag(), s_Fingerprint_Gb_qual(), s_Fingerprint_Giimport_id(), s_Fingerprint_Object_id(), s_Fingerprint_Patent_seq_id(), s_Fingerprint_PDB_seq_id(), s_Fingerprint_Seq_feat(), s_Fingerprint_Seq_graph(), s_Fingerprint_Textseq_id(), s_GetCacheKey(), CQueryParsePanel::SetDataSource(), CWorkbenchFrame::SetPagerMessage(), CFileCode::WriteUserFile(), CWigGraph::x_CreateNetCacheKey(), CPubseqGatewayApp::x_CreateRequestContext(), CRmtFileStatus::x_KeyToNCKey(), CNSClientId::x_NormalizeNodeOrSession(), CAgpFastaComparator::x_Process(), and CWorkbenchFrame::x_ShowPagerMessage().
Definition at line 616 of file checksum.hpp.
References CChecksum::AddLine().
void CChecksum::AddStream | ( | CNcbiIstream & | is | ) |
Update checksum with the stream data.
On error an exception will be thrown, and the checksum not change.
is | Input stream to read data from. Please use ios_base::binary flag for the input stream if you want to count all symbols there, including end of lines. |
Definition at line 395 of file checksum.cpp.
References buf, n, NCBI_THROW, and tmp.
|
inline |
Definition at line 577 of file checksum.hpp.
References count, CChecksumBase::m_CharCount, str(), and CChecksumBase::x_Update().
Definition at line 263 of file checksum.cpp.
References CHash::Calculate(), CChecksumBase::GetResult32(), len, and str().
Definition at line 271 of file checksum.cpp.
References CHash::Calculate(), CChecksumBase::GetResult64(), len, and str().
|
inline |
Calculate hash.
Definition at line 570 of file checksum.hpp.
References CChecksumBase::m_CharCount, str(), and CChecksumBase::x_Update().
Referenced by CHash::Calculate().
|
static |
Static methods for simplified one line calculations.
Definition at line 247 of file checksum.cpp.
References CHash::Calculate(), CChecksumBase::GetResult32(), and str().
|
static |
Definition at line 255 of file checksum.cpp.
References CHash::Calculate(), CChecksumBase::GetResult64(), and str().
Copy constructor.
Definition at line 286 of file checksum.cpp.
Default constructor.
Definition at line 279 of file checksum.cpp.
CChecksumBase::CChecksumBase | ( | const CChecksumBase & | other | ) |
Copy constructor.
Definition at line 122 of file checksum.cpp.
References CChecksumBase::eMD5, CChecksumBase::m_Method, CChecksumBase::m_Value, CChecksumBase::md5, and CChecksumBase::v64.
CChecksumBase::CChecksumBase | ( | EMethodDef | method | ) |
Default constructor.
Definition at line 109 of file checksum.cpp.
References CChecksumBase::x_Reset().
CChecksumStreamWriter::CChecksumStreamWriter | ( | CChecksum::EMethod | method | ) |
Construct object to compute checksum for written data.
Definition at line 1337 of file checksum.cpp.
Copy constructor.
Definition at line 224 of file checksum.cpp.
Default constructor.
Definition at line 218 of file checksum.cpp.
Definition at line 1239 of file checksum.cpp.
References CityHash32(), len, and str().
|
static |
Definition at line 1249 of file checksum.cpp.
References CityHash64(), len, and str().
|
static |
Definition at line 1244 of file checksum.cpp.
References CityHash64(), and str().
Referenced by GetIdHash().
CMD5::CMD5 | ( | void | ) |
Definition at line 58 of file md5.cpp.
References CMD5::m_Buf.
NCBI_XUTIL_EXPORT CChecksum& ComputeFileChecksum | ( | const string & | path, |
CChecksum & | checksum | ||
) |
Computes checksum for the given file.
Definition at line 450 of file checksum.cpp.
References ComputeFileChecksum_deprecated().
NCBI_XUTIL_EXPORT CChecksum ComputeFileChecksum | ( | const string & | path, |
CChecksum::EMethod | method | ||
) |
Compute checksum for the given file.
Definition at line 443 of file checksum.cpp.
References ComputeFileChecksum_deprecated().
NCBI_XUTIL_EXPORT Uint4 ComputeFileCRC32 | ( | const string & | path | ) |
Compute CRC32 checksum for the given file.
Definition at line 456 of file checksum.cpp.
References ComputeFileChecksum_deprecated(), CChecksum::eCRC32, and CChecksum::GetChecksum().
Definition at line 1260 of file checksum.cpp.
References util::Hash32(), len, and str().
|
static |
Definition at line 1270 of file checksum.cpp.
References util::Hash64(), len, and str().
|
static |
Definition at line 1265 of file checksum.cpp.
References util::Hash64(), and str().
void CMD5::Finalize | ( | unsigned char | digest[16] | ) |
Definition at line 118 of file md5.cpp.
References count, int, CMD5::kBlockSize, CMD5::m_Bits, CMD5::m_Buf, CMD5::m_Finalized, CMD5::m_In, and CMD5::Transform().
Referenced by CMD5::GetHexSum().
|
virtual |
Flush pending data (if any) down to the output device.
Implements IWriter.
Definition at line 1359 of file checksum.cpp.
References eRW_Success.
|
inline |
Return size of checksum/hash in bits (32, 64).
Definition at line 496 of file checksum.hpp.
References CChecksumBase::GetSize().
Referenced by CChecksumBase::GetResultHex().
|
inline |
Return calculated checksum.
Definition at line 341 of file checksum.hpp.
References CChecksumBase::GetResult32().
Referenced by ComputeFileCRC32(), CScoreBuilder::ComputeTieBreaker(), CBinsGlyph::GenerateBinSignature(), CGeneMarkerGlyph::GenerateGeneMarkerSignature(), GenerateSignature(), CObjFingerprint::GetAlignSignature(), CObjFingerprint::GetComponentSignature(), CObjFingerprint::GetFeatSignature(), CLDS2_UrlHandler_File::GetFileCRC(), CObjFingerprint::GetGraphSignature(), CObjFingerprint::GetHistogramSignature(), CObjFingerprint::GetRsiteSignature(), CObjFingerprint::GetSeqLocSignature(), CObjFingerprint::GetVcfVariantSignature(), CNetService::IterateByWeight(), CDemoApp::Run(), s_GetCheckSumForFile(), sx_CalcHash(), CChecksum::WriteHexSum(), CPubseqGatewayApp::x_CreateRequestContext(), and CBGZFFile::x_ReadBlock().
Return checksum.
Definition at line 660 of file checksum.hpp.
References CChecksumStreamWriter::m_Checksum.
Referenced by s_EquivalentExts().
|
inline |
Return size of checksum in bytes.
Use this name for backward compatibility.
Definition at line 333 of file checksum.hpp.
References CChecksumBase::GetSize().
|
overridevirtual |
Translate from an error code value to its string representation.
Reimplemented from CCoreException.
Definition at line 1322 of file checksum.cpp.
References CChecksumException::eFileIO, CChecksumException::eStreamIO, CCoreException::GetErrCode(), and CException::GetErrCodeString().
|
static |
|
inline |
Definition at line 73 of file md5.hpp.
References CMD5::Finalize().
|
inline |
Return string with checksum in hexadecimal form.
Use this name for backward compatibility.
Definition at line 353 of file checksum.hpp.
References CChecksumBase::GetResultHex().
Referenced by CBedCoverageGraph::CBedCoverageGraph(), CPileUpGraph::CPileUpGraph(), CVcfHeatmap::CVcfHeatmap(), CVcfHistogram::CVcfHistogram(), CObjFingerprint::GetFeatSignature(), s_GetCacheKey(), CWorkbenchFrame::SetPagerMessage(), CWigGraph::x_CreateNetCacheKey(), CNSClientId::x_NormalizeNodeOrSession(), and CWorkbenchFrame::x_ShowPagerMessage().
|
inline |
Definition at line 644 of file checksum.hpp.
References _ASSERT, buf, CChecksum::eMD5, CChecksum::GetMethod(), CChecksumBase::m_Value, and str().
|
inline |
Return calculated MD5 digest.
Definition at line 637 of file checksum.hpp.
References _ASSERT, CChecksum::eMD5, CChecksum::GetMethod(), and CChecksumBase::m_Value.
Referenced by CFetchURL::Fetch(), GetMD5Digest(), CMD5StreamWriter< Buffer >::GetMD5Sum(), CTableDataBase::GetTableTypeId(), NS_GetConfigFileChecksum(), NST_GetConfigFileChecksum(), s_EquivalentExts(), CAgpFastaComparator::x_Process(), and CSparseGraph::x_ReadMap().
|
inline |
Get current method used to compute hash.
Definition at line 502 of file checksum.hpp.
References CChecksumBase::m_Method.
|
inline |
Get current method used to compute checksum.
Definition at line 508 of file checksum.hpp.
References CChecksumBase::m_Method.
Referenced by CChecksum::GetMD5Digest(), CChecksum::WriteChecksumData(), and CChecksum::WriteHexSum().
|
inline |
Return calculated result.
Definition at line 514 of file checksum.hpp.
References _ASSERT, CChecksumBase::eAdler32, CChecksumBase::eCityHash32, CChecksumBase::eCRC32, CChecksumBase::eCRC32C, CChecksumBase::eCRC32CKSUM, CChecksumBase::eCRC32INSD, CChecksumBase::eCRC32ZIP, CChecksumBase::eFarmHash32, CChecksumBase::eMurmurHash2_32, CChecksumBase::eMurmurHash3_32, len, CChecksumBase::m_CharCount, CChecksumBase::m_Method, CChecksumBase::m_Value, CChecksumBase::v32, and CChecksumBase::x_Update().
Referenced by CHash::Calculate(), CChecksum::GetChecksum(), and CChecksumBase::GetResultHex().
|
inline |
Return calculated result.
Definition at line 547 of file checksum.hpp.
References _ASSERT, CChecksumBase::eCityHash64, CChecksumBase::eFarmHash64, CChecksumBase::eMurmurHash2_64, CChecksumBase::m_Method, and CChecksumBase::m_Value.
Referenced by CHash::Calculate(), and CChecksumBase::GetResultHex().
string CChecksumBase::GetResultHex | ( | void | ) | const |
Return string with checksum/hash in hexadecimal form.
Definition at line 153 of file checksum.cpp.
References _ASSERT, CChecksumBase::eMD5, CChecksumBase::GetBits(), CChecksumBase::GetResult32(), CChecksumBase::GetResult64(), kEmptyStr, CChecksumBase::m_Method, CChecksumBase::m_Value, and NStr::NumericToString().
Referenced by CChecksum::GetHexSum(), and CRmtFileStatus::x_KeyToNCKey().
|
inline |
Return size of checksum/hash in bytes, depending on used method.
Definition at line 481 of file checksum.hpp.
References CChecksumBase::eCityHash64, CChecksumBase::eFarmHash64, CChecksumBase::eMD5, CChecksumBase::eMurmurHash2_64, and CChecksumBase::m_Method.
Referenced by CChecksumBase::GetBits(), and CChecksum::GetChecksumSize().
|
static |
Initialize static tables used in CRC32 calculation.
There is no need to call this method since it's done internally when necessary.
Definition at line 463 of file checksum.cpp.
References s_InitTableCRC32CReverse(), s_InitTableCRC32Forward(), and s_InitTableCRC32Reverse().
Referenced by CPubseqGatewayApp::CPubseqGatewayApp(), and CChecksumBase::PrintTables().
Definition at line 1281 of file checksum.cpp.
References _ASSERT, kMax_Int, len, MurmurHash2(), seed, and str().
|
static |
MurmurHash2.
Definition at line 1275 of file checksum.cpp.
References _ASSERT, kMax_Int, MurmurHash2(), seed, and str().
Definition at line 1307 of file checksum.cpp.
References _ASSERT, kMax_Int, len, NHash::MurmurHash3_x86_32(), result, seed, and str().
|
static |
MurmurHash3 (32-bit version only)
Definition at line 1299 of file checksum.cpp.
References _ASSERT, kMax_Int, result, seed, and str().
Referenced by NHash::MurmurHash3_x86_32().
Definition at line 1293 of file checksum.cpp.
References _ASSERT, kMax_Int, len, MurmurHash64A(), seed, and str().
|
static |
Definition at line 1287 of file checksum.cpp.
References _ASSERT, kMax_Int, MurmurHash64A(), seed, and str().
CChecksumException::NCBI_EXCEPTION_DEFAULT | ( | CChecksumException | , |
CCoreException | |||
) |
void CChecksum::NextLine | ( | void | ) |
Definition at line 365 of file checksum.cpp.
References CChecksum::m_LineCount, and CChecksumBase::x_Update().
Referenced by CChecksum::AddLine(), and CFileCode::ModifiedByUser().
CNcbiOstream& operator<< | ( | CNcbiOstream & | out, |
const CChecksum & | checksum | ||
) |
Write checksum calculation results into output stream.
Definition at line 654 of file checksum.hpp.
References out(), and CChecksum::WriteChecksum().
Assignment operator.
Definition at line 293 of file checksum.cpp.
References CChecksum::m_LineCount, and CChecksumBase::operator=().
CChecksumBase & CChecksumBase::operator= | ( | const CChecksumBase & | other | ) |
Assignment operator.
Definition at line 134 of file checksum.cpp.
References CChecksumBase::eMD5, CChecksumBase::m_CharCount, CChecksumBase::m_Method, CChecksumBase::m_Value, CChecksumBase::md5, CChecksumBase::v64, and CChecksumBase::x_Free().
Referenced by CChecksum::operator=(), and CHash::operator=().
Assignment operator.
Definition at line 230 of file checksum.cpp.
References CChecksumBase::operator=().
|
static |
Print C++ code for CRC32 tables for direct inclusion into library.
Such inclusion eliminates the need to initialize CRC32 tables.
Definition at line 1150 of file checksum.cpp.
References CChecksumBase::InitTables(), out(), s_CRC32CTableReverse, s_CRC32TableForward, s_CRC32TableReverse, and s_PrintTable().
|
inline |
Reset the object to prepare it to the next computation using another method.
Definition at line 584 of file checksum.hpp.
References CChecksumBase::x_Reset().
|
inline |
Reset the object to prepare it to the next checksum computation with different method.
Definition at line 590 of file checksum.hpp.
References CChecksumBase::x_Reset().
|
inline |
Reset the object to prepare it to the next checksum computation with the same method.
Definition at line 596 of file checksum.hpp.
References CChecksumBase::m_Method, and CChecksumBase::x_Reset().
|
static |
Unique seed used by some hash methods.
Usually this value sets once per process if needed. 0 by default, if not specified.
Definition at line 241 of file checksum.cpp.
References CChecksumBase::m_Seed, and seed.
|
private |
Definition at line 198 of file md5.cpp.
References a, b, F1, F2, F3, F4, CMD5::m_Buf, CMD5::m_In, and MD5STEP.
Referenced by CMD5::Finalize(), and CMD5::Update().
void CMD5::Update | ( | const char * | buf, |
size_t | length | ||
) |
Definition at line 69 of file md5.cpp.
References buf, int, CMD5::kBlockSize, CMD5::m_Bits, CMD5::m_Finalized, CMD5::m_In, NCBI_THROW, tmp, and CMD5::Transform().
Check for checksum line.
Definition at line 622 of file checksum.hpp.
References CChecksum::kMinimumChecksumLength, len, and CChecksum::ValidChecksumLineLong().
Referenced by CFileCode::ModifiedByUser(), and CChecksum::ValidChecksumLine().
Definition at line 631 of file checksum.hpp.
References CChecksum::ValidChecksumLine().
Check for checksum line.
Definition at line 314 of file checksum.cpp.
References buffer, len, and CChecksum::WriteChecksum().
Referenced by CChecksum::ValidChecksumLine().
|
virtual |
Virtual methods from IWriter.
Implements IWriter.
Definition at line 1348 of file checksum.cpp.
References CChecksum::AddChars(), buf, count, eRW_Success, and CChecksumStreamWriter::m_Checksum.
CNcbiOstream & CChecksum::WriteChecksum | ( | CNcbiOstream & | out | ) | const |
Write checksum calculation results into output stream.
Definition at line 301 of file checksum.cpp.
References CChecksumBase::m_CharCount, CChecksum::m_LineCount, out(), sx_CharCount, sx_End, sx_LineCount, sx_Start, and CChecksum::WriteChecksumData().
Referenced by operator<<(), and CChecksum::ValidChecksumLineLong().
CNcbiOstream & CChecksum::WriteChecksumData | ( | CNcbiOstream & | out | ) | const |
Definition at line 340 of file checksum.cpp.
References _ASSERT, CChecksum::eAdler32, CChecksum::eCRC32, CChecksum::eCRC32C, CChecksum::eCRC32CKSUM, CChecksum::eCRC32INSD, CChecksum::eCRC32ZIP, CChecksum::eMD5, CChecksum::GetMethod(), out(), and CChecksum::WriteHexSum().
Referenced by CCgiRequest::CalcChecksum(), and CChecksum::WriteChecksum().
CNcbiOstream & CChecksum::WriteHexSum | ( | CNcbiOstream & | out | ) | const |
Definition at line 326 of file checksum.cpp.
References CChecksum::eMD5, flags, CChecksum::GetChecksum(), CChecksum::GetMethod(), hex(), CChecksumBase::m_Value, and out().
Referenced by CChecksum::WriteChecksumData().
|
inlineprotected |
Cleanup (used in destructor and assignment operator).
Definition at line 561 of file checksum.hpp.
References CChecksumBase::eMD5, CChecksumBase::m_Method, CChecksumBase::m_Value, and NULL.
Referenced by CChecksumBase::operator=(), CChecksumBase::x_Reset(), and CChecksumBase::~CChecksumBase().
|
inline |
Definition at line 139 of file checksum.hpp.
References CChecksumBase::m_Method.
|
protected |
Reset the object to prepare it to the next computation using selected method.
Definition at line 171 of file checksum.cpp.
References _ASSERT, CChecksumBase::eAdler32, CChecksumBase::eCityHash32, CChecksumBase::eCityHash64, CChecksumBase::eCRC32, CChecksumBase::eCRC32C, CChecksumBase::eCRC32CKSUM, CChecksumBase::eCRC32INSD, CChecksumBase::eCRC32ZIP, CChecksumBase::eFarmHash32, CChecksumBase::eFarmHash64, CChecksumBase::eMD5, CChecksumBase::eMurmurHash2_32, CChecksumBase::eMurmurHash2_64, CChecksumBase::eMurmurHash3_32, CChecksumBase::m_CharCount, CChecksumBase::m_Method, CChecksumBase::m_Value, s_InitTableCRC32CReverse(), s_InitTableCRC32Forward(), s_InitTableCRC32Reverse(), and CChecksumBase::x_Free().
Referenced by CChecksumBase::CChecksumBase(), CHash::Reset(), and CChecksum::Reset().
|
protected |
Update current control sum with data provided.
Definition at line 1159 of file checksum.cpp.
References _ASSERT, CityHash32(), CityHash64(), count, CChecksumBase::eAdler32, CChecksumBase::eCityHash32, CChecksumBase::eCityHash64, CChecksumBase::eCRC32, CChecksumBase::eCRC32C, CChecksumBase::eCRC32CKSUM, CChecksumBase::eCRC32INSD, CChecksumBase::eCRC32ZIP, CChecksumBase::eFarmHash32, CChecksumBase::eFarmHash64, CChecksumBase::eMD5, CChecksumBase::eMurmurHash2_32, CChecksumBase::eMurmurHash2_64, CChecksumBase::eMurmurHash3_32, util::Hash32(), util::Hash64(), int, kMax_Int, CChecksumBase::m_CharCount, CChecksumBase::m_Method, CChecksumBase::m_Seed, CChecksumBase::m_Value, MurmurHash2(), MurmurHash3_x86_32(), MurmurHash64A(), n, s_CRC32CTableReverse, s_CRC32TableForward, s_CRC32TableReverse, s_UpdateAdler32(), s_UpdateCRC32Forward(), s_UpdateCRC32Reverse(), and str().
Referenced by CChecksum::AddChars(), CHash::Calculate(), CChecksumBase::GetResult32(), and CChecksum::NextLine().
CChecksumBase::~CChecksumBase | ( | ) |
|
virtual |
Definition at line 1343 of file checksum.cpp.
|
private |
Definition at line 66 of file md5.hpp.
Referenced by CMD5::Finalize(), and CMD5::Update().
|
private |
Definition at line 65 of file md5.hpp.
Referenced by CMD5::CMD5(), CMD5::Finalize(), and CMD5::Transform().
|
protected |
Number of processed chars.
Definition at line 145 of file checksum.hpp.
Referenced by CChecksum::AddChars(), CHash::Calculate(), CChecksumBase::GetResult32(), CChecksumBase::operator=(), CChecksum::WriteChecksum(), CChecksumBase::x_Reset(), and CChecksumBase::x_Update().
|
private |
Checksum calculator.
Definition at line 468 of file checksum.hpp.
Referenced by CChecksumStreamWriter::GetChecksum(), and CChecksumStreamWriter::Write().
|
private |
Definition at line 68 of file md5.hpp.
Referenced by CMD5::Finalize(), and CMD5::Update().
|
private |
Definition at line 67 of file md5.hpp.
Referenced by CMD5::Finalize(), CMD5::Transform(), and CMD5::Update().
|
private |
Number of processed lines.
Definition at line 390 of file checksum.hpp.
Referenced by CChecksum::NextLine(), CChecksum::operator=(), and CChecksum::WriteChecksum().
|
protected |
Current method.
Definition at line 144 of file checksum.hpp.
Referenced by CChecksumBase::CChecksumBase(), CHash::GetMethod(), CChecksum::GetMethod(), CChecksumBase::GetResult32(), CChecksumBase::GetResult64(), CChecksumBase::GetResultHex(), CChecksumBase::GetSize(), CChecksumBase::operator=(), CChecksum::Reset(), CChecksumBase::x_Free(), CChecksumBase::x_GetMethod(), CChecksumBase::x_Reset(), and CChecksumBase::x_Update().
|
staticprotected |
Unique seed used by some hash methods.
Usually this value sets once per process if needed. 0 by default, if not specified.
Definition at line 150 of file checksum.hpp.
Referenced by CHash::SetSeed(), and CChecksumBase::x_Update().
union { ... } CChecksumBase::m_Value |
Checksum/Hash computation result.
Referenced by CChecksumBase::CChecksumBase(), CChecksum::GetMD5Digest(), CChecksumBase::GetResult32(), CChecksumBase::GetResult64(), CChecksumBase::GetResultHex(), CChecksumBase::operator=(), CChecksum::WriteHexSum(), CChecksumBase::x_Free(), CChecksumBase::x_Reset(), and CChecksumBase::x_Update().
CMD5* CChecksumBase::md5 |
Used for MD5 calculation.
Definition at line 156 of file checksum.hpp.
Referenced by CChecksumBase::CChecksumBase(), and CChecksumBase::operator=().
CMD5* { ... } ::md5 |
Used for MD5 calculation.
Definition at line 156 of file checksum.hpp.
Uint4 { ... } ::v32 |
Used to store 32-bit results.
Definition at line 154 of file checksum.hpp.
Uint4 CChecksumBase::v32 |
Used to store 32-bit results.
Definition at line 154 of file checksum.hpp.
Referenced by CChecksumBase::GetResult32().
Uint8 CChecksumBase::v64 |
Used to store 64-bit results.
Definition at line 155 of file checksum.hpp.
Referenced by CChecksumBase::CChecksumBase(), and CChecksumBase::operator=().
Uint8 { ... } ::v64 |
Used to store 64-bit results.
Definition at line 155 of file checksum.hpp.