![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cHashSHA512.h>
Public Member Functions | |
| cHashSHA512Builder (bool is384=false) | |
| virtual | ~cHashSHA512Builder () |
| void | SetZeroHash () |
| virtual void | ResetHash () override |
| virtual void | ProcessHashBuffer (const BYTE pBuffer[128]) override |
| virtual void | AddToHash (const void *pInput, size_t nSizeIn) override |
| Digest update function. More... | |
| virtual size_t | FinalizeHash (BYTE *pOutput) override |
| virtual void | InitHmac (const BYTE *pKey, size_t nKeySize) override |
| virtual size_t | FinalizeHmac (BYTE pOutput[64]) override |
| virtual void | ResetHmac () override |
Public Member Functions inherited from GrayLib::cHashBase | |
| virtual | ~cHashBase () |
| virtual void | ProcessHashBuffer (const BYTE *pBuffer) |
| virtual size_t | FinalizeHash (OUT BYTE *pOutput)=0 |
| Digest finalization function. More... | |
| size_t | ComputeHash (BYTE *pOutput, const void *pInput, size_t nInputSize) |
| virtual size_t | FinalizeHmac (OUT BYTE *pOutput) |
| HMAC finalization function. More... | |
| size_t | ComputeHmac (BYTE *pOutput, const BYTE *pKey, size_t nKeySize, const void *pInput, size_t nInputSize) |
| void | AddToHashFromBlock (const cHeapBlock &m) |
| Helpers. More... | |
| StrLen_t | AddToHashFromStr (const char *pszStr) |
| HRESULT | AddToHashFromStream (cStreamInput &file, IStreamProgressCallback *pProgress=nullptr) |
| HRESULT | AddToHashFromFile (const FILECHAR_t *pszFileName, IStreamProgressCallback *pProgress=nullptr) |
| HRESULT | ComputeHashFromStream (OUT BYTE *pOutput, cStreamInput &fin, IStreamProgressCallback *pProgress=nullptr) |
| HRESULT | ComputeHashFromFile (OUT BYTE *pOutput, const FILECHAR_t *pszFileName, IStreamProgressCallback *pProgress=nullptr) |
Public Member Functions inherited from Gray::CObject | |
| virtual | ~CObject () |
| virtual bool | isValidCheck () const noexcept |
| < memory allocation and structure definitions are valid. More... | |
| virtual void | AssertValid () const |
| < memory allocation and structure definitions are valid. More... | |
| virtual void | Serialize (cArchive &a) |
Public Attributes | |
| UINT64 | m_total [2] |
| number of bytes processed More... | |
| UINT64 | m_state [8] |
| intermediate digest state More... | |
| BYTE | m_buffer [128] |
| data block being processed More... | |
| BYTE | m_ipad [128] |
| HMAC: inner padding. More... | |
| BYTE | m_opad [128] |
| HMAC: outer padding. More... | |
| bool | m_is384 |
| 0 => SHA-512 (64 bytes), else SHA-384 (48 bytes) More... | |
Static Public Attributes | |
| static const size_t | k_HashSize = 64 |
| static const UINT64 | k_K [80] |
Static Public Attributes inherited from GrayLib::cHashBase | |
| static const BYTE | k_Padding [128] |
| 0x80 followed by zeros. More... | |
| static const size_t | k_HashSizeMax = 64 |
| Largest hash k_HashSize that we support. in bytes. More... | |
SHA-512 (64 bytes) or 384 Builder (48 bytes) Build my SHA hash from some stream. NON reversible hash, but possible to brute force guess.
|
inline |
|
inlinevirtual |
|
overridevirtual |
Digest update function.
Implements GrayLib::cHashBase.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Reimplemented from GrayLib::cHashBase.
|
overridevirtual |
Internal use. sizeof(this->m_buffer)
|
overridevirtual |
Implements GrayLib::cHashBase.
|
overridevirtual |
Reimplemented from GrayLib::cHashBase.
|
inline |
|
static |
|
static |
| BYTE GrayLib::cHashSHA512Builder::m_buffer[128] |
data block being processed
| BYTE GrayLib::cHashSHA512Builder::m_ipad[128] |
HMAC: inner padding.
| bool GrayLib::cHashSHA512Builder::m_is384 |
0 => SHA-512 (64 bytes), else SHA-384 (48 bytes)
| BYTE GrayLib::cHashSHA512Builder::m_opad[128] |
HMAC: outer padding.
| UINT64 GrayLib::cHashSHA512Builder::m_state[8] |
intermediate digest state
| UINT64 GrayLib::cHashSHA512Builder::m_total[2] |
number of bytes processed