Rudiments
|
#include <hash.h>
Inherits object.
Inherited by des, md5, sha1, and sha256.
Public Member Functions | |
hash () | |
virtual | ~hash () |
virtual bool | setSalt (const byte_t *salt, size_t size) |
virtual const byte_t * | getSalt () |
virtual size_t | getSaltSize () |
virtual bool | append (const byte_t *data, uint32_t size) |
virtual const byte_t * | getHash ()=0 |
virtual uint64_t | getHashSize () |
virtual hasherror_t | getError () |
virtual bool | clear () |
virtual bool | reset () |
Public Member Functions inherited from object | |
virtual | ~object () |
The hash class defines an interface for hashing.
hash::hash | ( | ) |
Creates an instance of the hash class.
|
virtual |
Deletes this instance of the hash class.
|
virtual |
Returns the most recent error.
|
virtual |
Returns the salt set by a previous call to setSalt() or NULL if no salt has been set.
Returns the number of bytes in the salt.
Reimplemented in des.
Clears the current hash and any data that had previously been appended, and the salt.
This implementation always returns true, but a child class may override this method to return false if something fails, and possibly set an error.