51 std::string
get_hash(
bool uppercase =
false)
const;
67 void set_hmac(
const void *key_data,
int key_size);
70 void add(
const void *data,
int size);
81 std::shared_ptr<SHA1_Impl> impl;
General purpose data buffer.
Definition: databuffer.h:42
SHA-1 hash function class.
Definition: sha1.h:43
void add(const void *data, int size)
Adds data to be hashed.
void add(const DataBuffer &data)
Add.
static const int hash_size
Definition: sha1.h:48
void get_hash(unsigned char out_hash[hash_size]) const
Get hash.
void calculate()
Finalize hash calculation.
void reset()
Resets the hash generator.
SHA1()
Constructs a SHA-1 hash generator.
std::string get_hash(bool uppercase=false) const
Returns the calculated hash.
void set_hmac(const void *key_data, int key_size)
Enable a HMAC based calculation.