|
OpenImageIO
|
#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. | |
| void | append (const void *data, size_t size) |
| Append more data. | |
| template<class T > | |
| void | appendvec (const std::vector< T > &v) |
| Append more data from a vector, without thinking about sizes. | |
| void | gethash (Hash &h) |
| Get the digest and store it in Hash h. | |
| void | gethash (void *h) |
| std::string | digest () |
| Return the digest as a hex string. | |
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. | |
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 | ( | const void * | data = NULL, |
| size_t | size = 0 |
||
| ) |
Create SHA1, optionally read data.
| void SHA1::append | ( | const void * | data, |
| size_t | size | ||
| ) |
Append more data.
|
inline |
Append more data from a vector, without thinking about sizes.
| std::string SHA1::digest | ( | ) |
Return the digest as a hex string.
|
inlinestatic |
Roll the whole thing into one functor, return the string digest.
|
inline |
Get the digest and store it in h (must point to enough storage to accommodate 20 bytes).
1.8.2