HDK
|
#include <hash.h>
Classes | |
struct | Hash |
Type for storing the raw bits of the hash. More... | |
Public Member Functions | |
SHA1 (const void *data=NULL, size_t size=0) | |
Create SHA1, optionally read data. More... | |
~SHA1 () | |
void | append (const void *data, size_t size) |
Append more data. More... | |
void | append (string_view s) |
Append more data from a string_view. More... | |
template<class T > | |
void | append (span< T > v) |
Append more data from a span, without thinking about sizes. More... | |
void | gethash (Hash &h) |
Get the digest and store it in Hash h. More... | |
void | gethash (void *h) |
std::string | digest () |
Return the digest as a hex string. More... | |
Static Public Member Functions | |
static std::string | digest (const void *data, size_t size) |
Roll the whole thing into one functor, return the string digest. More... | |
Class that encapsulates SHA-1 hashing, a crypticographic-strength 160-bit hash function. It's not as fast as our other hashing methods, but has an extremely low chance of having collisions.
SHA1::~SHA1 | ( | ) |
|
inline |
Append more data from a string_view.
std::string SHA1::digest | ( | ) |
Return the digest as a hex string.
|
inlinestatic |