SHA-1 hash function class. More...
#include <sha1.h>
Public Member Functions | |
virtual void | add (const void *data, int size)=0 |
Adds data to be hashed. More... | |
virtual void | add (const DataBufferPtr &data)=0 |
Add. More... | |
virtual void | calculate ()=0 |
Finalize hash calculation. More... | |
virtual std::string | hash (bool uppercase=false) const =0 |
Returns the calculated hash. More... | |
virtual void | hash (unsigned char out_hash[hash_size]) const =0 |
Get hash. More... | |
virtual void | reset ()=0 |
Resets the hash generator. More... | |
virtual void | set_hmac (const void *key_data, int key_size)=0 |
Enable a HMAC based calculation. More... | |
Static Public Member Functions | |
static std::shared_ptr< SHA1 > | create () |
Constructs a SHA-1 hash generator. More... | |
Static Public Attributes | |
static const int | hash_size = 20 |
SHA-1 hash function class.
|
pure virtual |
Adds data to be hashed.
|
pure virtual |
Add.
data | = Data Buffer |
|
pure virtual |
Finalize hash calculation.
|
static |
Constructs a SHA-1 hash generator.
|
pure virtual |
Returns the calculated hash.
|
pure virtual |
Get hash.
out_hash | = where to write to |
|
pure virtual |
Resets the hash generator.
|
pure virtual |
|
static |