The sha1 class provides a simple sha1 implementation.
Creates an instance of the sha1 class.
Deletes this instance of the sha1 class.
bool sha1::append |
( |
const unsigned char * |
data, |
|
|
uint32_t |
length |
|
) |
| |
Appends "length" bytes of "data" to the data to be hashed. Returns true on success or false if an error occurred.
Clears the current hash and any data that had previously been appended. Returns true on success or false if an error occurred.
sha1error sha1::getError |
( |
| ) |
|
Returns the most recent error.
const unsigned char* sha1::getHash |
( |
| ) |
|
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.
uint32_t sha1::getHashLength |
( |
| ) |
|
Returns the length of the hash in bytes.