Cryptographics Hash Base.
More...
#include <wxex/crypto.h>
|
| wxCryptoHash () |
| Creates a new cryptographics hash.
|
|
virtual | ~wxCryptoHash () |
| Destructor.
|
|
bool | IsOk () const noexcept |
| Has the hash creation been successful?
|
|
| operator HCRYPTHASH () const noexcept |
|
bool | Hash (_In_reads_bytes_(size) const void *data, size_t size) |
| Hashes given block of data.
|
|
bool | Hash (const wxMemoryBuffer &data) |
| Hashes given block of data.
|
|
bool | HashAsUTF8 (const wxString &str) |
| Converts string to UTF-8 and hashes it.
|
|
bool | HashFile (const wxString &fileName) |
| Hashes a file.
|
|
virtual bool | GetValue (wxMemoryBuffer &hash) |
| Finish hashing and return hash data.
|
|
bool | Sign (wxMemoryBuffer &signature) |
| Signs the hash using session key.
|
|
wxMemoryBuffer | Sign () |
| Signs the hash using session key.
|
|
|
HCRYPTHASH | m_h |
| Hash Handle.
|
|
Cryptographics Hash Base.
◆ GetValue()
bool wxCryptoHash::GetValue |
( |
wxMemoryBuffer & | hash | ) |
|
|
virtual |
Finish hashing and return hash data.
- Parameters
-
- Returns
true
if succeeded
false
otherwise
Reimplemented in wxCryptoHashSHA1.
◆ Hash() [1/2]
bool wxCryptoHash::Hash |
( |
_In_reads_bytes_(size) const void * | data, |
|
|
size_t | size ) |
Hashes given block of data.
- Parameters
-
[in] | data | Pointer to memory block |
[in] | size | Size of memory block in bytes |
- Returns
true
if hashing succeeded
false
otherwise
◆ Hash() [2/2]
bool wxCryptoHash::Hash |
( |
const wxMemoryBuffer & | data | ) |
|
|
inline |
Hashes given block of data.
- Parameters
-
- Returns
true
if hashing succeeded
false
otherwise
◆ HashAsUTF8()
bool wxCryptoHash::HashAsUTF8 |
( |
const wxString & | str | ) |
|
|
inline |
Converts string to UTF-8 and hashes it.
- Parameters
-
- Returns
true
if hashing succeeded
false
otherwise
◆ HashFile()
bool wxCryptoHash::HashFile |
( |
const wxString & | fileName | ) |
|
|
inline |
Hashes a file.
- Parameters
-
[in] | fileName | The path of the file to calculate hash of |
- Returns
true
if hashing succeeded
false
otherwise
◆ IsOk()
bool wxCryptoHash::IsOk |
( |
| ) |
const |
|
inlinenoexcept |
Has the hash creation been successful?
- Returns
true
if creation succeeded
false
otherwise
◆ operator HCRYPTHASH()
wxCryptoHash::operator HCRYPTHASH |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- Hash handle to be used in native API calls.
◆ Sign() [1/2]
wxMemoryBuffer wxCryptoHash::Sign |
( |
| ) |
|
|
inline |
Signs the hash using session key.
- Returns
- Digital Signature
◆ Sign() [2/2]
bool wxCryptoHash::Sign |
( |
wxMemoryBuffer & | signature | ) |
|
Signs the hash using session key.
- Parameters
-
[in,out] | signature | Digital signature |
- Returns
true
if signing succeeded
false
otherwise
The documentation for this class was generated from the following files: