Inherits hash.
The sha256 class provides a simple sha256 implementation.
◆ sha256()
Creates an instance of the sha256 class.
◆ ~sha256()
virtual sha256::~sha256 |
( |
| ) |
|
|
virtual |
Deletes this instance of the sha256 class.
◆ append()
bool sha256::append |
( |
const byte_t * |
data, |
|
|
uint32_t |
size |
|
) |
| |
|
virtual |
Appends "size" bytes of "data" to the data to be hashed. Returns true on success or false if an error occurred.
Reimplemented from hash.
◆ clear()
Clears the current hash and any data that had previously been appended. Returns true on success or false if an error occurred.
Reimplemented from hash.
◆ getError()
hasherror_t sha256::getError |
( |
| ) |
|
|
virtual |
Returns the most recent error.
Reimplemented from hash.
◆ getHash()
const byte_t* sha256::getHash |
( |
| ) |
|
|
virtual |
Returns the current hash on success or NULL if an error occurred. Note that the current hash will be an empty string if no data has been appended yet.
Implements hash.
◆ getHashSize()
uint64_t sha256::getHashSize |
( |
| ) |
|
|
virtual |
Returns the number of bytes in the hash.
Reimplemented from hash.