LightsprintSDK 2021.08.08
|
#include <RRHash.h>
Public Member Functions | |
RRHash () | |
RRHash (const unsigned char *data, unsigned size) | |
RRString | getFileName (unsigned version, const char *prefix, const char *postfix) const |
bool | operator!= (const RRHash &a) const |
void | operator+= (const RRHash &a) |
Public Attributes | |
unsigned char | value [20] |
Helper class that calculates/stores hash and converts it to filename.
rr::RRHash::RRHash | ( | ) |
Resets value to 0.
rr::RRHash::RRHash | ( | const unsigned char * | data, |
unsigned | size | ||
) |
Calculates hash value from data.
RRString rr::RRHash::getFileName | ( | unsigned | version, |
const char * | prefix, | ||
const char * | postfix | ||
) | const |
Returns filename created from hash value, in format prefix + hash + postfix.
version | Additional number melted into hash, different versions produce different filenames. |
prefix | Optional prefix (e.g. "c:/path/") of returned filename. If nullptr, temporary directory is used. |
postfix | Optional postfix (e.g. ".extension") of returned filename. If nullptr, no postfix is appended. |
bool rr::RRHash::operator!= | ( | const RRHash & | a | ) | const |
void rr::RRHash::operator+= | ( | const RRHash & | a | ) |
unsigned char rr::RRHash::value[20] |
Hash value.