#include <vmsHash.h>
Public Member Functions | |
| void | set_SHA2Strength (vmsHash_SHA2Strength en) |
| void | set_EventsHandler (vmsHashEvents *pEvents) |
| std::string | Hash (LPCSTR pszFile, vmsHashAlgorithm enHA=HA_MD5) |
| vmsHash () | |
| virtual | ~vmsHash () |
Protected Member Functions | |
| std::string | Hash_SHA2 (LPCSTR pszFile) |
| std::string | Hash_SHA1 (LPCSTR pszFile) |
| std::string | Hash_CRC32 (LPCSTR pszFile) |
| std::string | Hash_ResultToStr (unsigned char *pHR, int nSize) |
| std::string | Hash_MD5 (LPCSTR pszFile) |
| UINT64 | Hash_MD5_File (const char *fn, unsigned long seed, void *mdContext) |
Protected Attributes | |
| vmsHashEvents * | m_pEvents |
| int | m_nSHA2Strength |
Definition at line 33 of file vmsHash.h.
| vmsHash::vmsHash | ( | ) |
| vmsHash::~vmsHash | ( | ) | [virtual] |
Definition at line 19 of file vmsHash.cpp.
| void vmsHash::set_SHA2Strength | ( | vmsHash_SHA2Strength | en | ) |
Definition at line 241 of file vmsHash.cpp.
References HSHA2S_256, HSHA2S_384, HSHA2S_512, and m_nSHA2Strength.
Referenced by CDlg_CheckFileIntegrity_Progress::_threadDoJob(), and fsDownloadsMgr::_threadIntegrityCheckAndVirCheckAndLaunch().
| void vmsHash::set_EventsHandler | ( | vmsHashEvents * | pEvents | ) |
Definition at line 113 of file vmsHash.cpp.
References m_pEvents.
Referenced by CDlg_CheckFileIntegrity_Progress::_threadDoJob().
| std::string vmsHash::Hash | ( | LPCSTR | pszFile, | |
| vmsHashAlgorithm | enHA = HA_MD5 | |||
| ) |
Definition at line 24 of file vmsHash.cpp.
References HA_CRC32, HA_MD5, HA_SHA1, HA_SHA2, Hash_CRC32(), Hash_MD5(), Hash_SHA1(), and Hash_SHA2().
Referenced by CDlg_CheckFileIntegrity_Progress::_threadDoJob(), and fsDownloadsMgr::_threadIntegrityCheckAndVirCheckAndLaunch().
| std::string vmsHash::Hash_SHA2 | ( | LPCSTR | pszFile | ) | [protected] |
Definition at line 202 of file vmsHash.cpp.
References vmsFile::get_Size(), Hash_ResultToStr(), m_nSHA2Strength, m_pEvents, vmsHashEvents::OnProgressChanged(), vmsFile::Open(), vmsFile::Read(), sha2(), sha2_begin(), sha2_end(), sha2_hash(), and TRUE.
Referenced by Hash().
| std::string vmsHash::Hash_SHA1 | ( | LPCSTR | pszFile | ) | [protected] |
Definition at line 163 of file vmsHash.cpp.
References vmsFile::get_Size(), Hash_ResultToStr(), m_pEvents, vmsHashEvents::OnProgressChanged(), vmsFile::Open(), vmsFile::Read(), sha1(), sha1_begin(), sha1_end(), sha1_hash(), and TRUE.
Referenced by Hash().
| std::string vmsHash::Hash_CRC32 | ( | LPCSTR | pszFile | ) | [protected] |
Definition at line 118 of file vmsHash.cpp.
References asio::buffer(), CCrc32Static::CalcCrc32(), crc32(), vmsFile::get_Size(), m_pEvents, MAX_BUFFER_SIZE, vmsHashEvents::OnProgressChanged(), vmsFile::Open(), vmsFile::Read(), and TRUE.
Referenced by Hash().
| std::string vmsHash::Hash_ResultToStr | ( | unsigned char * | pHR, | |
| int | nSize | |||
| ) | [protected] |
| std::string vmsHash::Hash_MD5 | ( | LPCSTR | pszFile | ) | [protected] |
Definition at line 44 of file vmsHash.cpp.
References MD5_CTX::digest, Hash_MD5_File(), and Hash_ResultToStr().
Referenced by Hash().
| UINT64 vmsHash::Hash_MD5_File | ( | const char * | fn, | |
| unsigned long | seed, | |||
| void * | mdContext | |||
| ) | [protected] |
Definition at line 52 of file vmsHash.cpp.
References vmsFile::get_Size(), m_pEvents, MD5Final(), MD5Init(), MD5Update(), vmsHashEvents::OnProgressChanged(), vmsFile::Open(), vmsFile::Read(), and TRUE.
Referenced by Hash_MD5().
vmsHashEvents* vmsHash::m_pEvents [protected] |
Definition at line 50 of file vmsHash.h.
Referenced by Hash_CRC32(), Hash_MD5_File(), Hash_SHA1(), Hash_SHA2(), set_EventsHandler(), and vmsHash().
int vmsHash::m_nSHA2Strength [protected] |
Definition at line 51 of file vmsHash.h.
Referenced by Hash_SHA2(), set_SHA2Strength(), and vmsHash().
1.5.6