Nektar++
|
Functions | |
void | calc (const void *src, const int bytelength, unsigned char *hash) |
Calculate the SHA1 hash of some data set. More... | |
void | toHexString (const unsigned char *hash, char *hexstring) |
Calculate a string which represents the SHA1 hash as a hexadecimal number. More... | |
void sha1::calc | ( | const void * | src, |
const int | bytelength, | ||
unsigned char * | hash | ||
) |
Calculate the SHA1 hash of some data set.
src | Points to any kind of data to be hashed. |
bytelength | The number of bytes to hash from the src pointer. |
hash | Points to a buffer of at least 20 bytes of size for storing the sha1 result in. |
Definition at line 150 of file sha1.cpp.
References Nektar::UnitTests::w().
Referenced by Nektar::MetricFile::CalculateHash().
void sha1::toHexString | ( | const unsigned char * | hash, |
char * | hexstring | ||
) |
Calculate a string which represents the SHA1 hash as a hexadecimal number.
hash | is 20 bytes of sha1 hash. This is the same data that is the result from the calc function. |
hexstring | should point to a buffer of at least 41 bytes of size for storing the hexadecimal representation of the hash. A zero will be written at position 40, so the buffer will be a valid zero ended string. |
Definition at line 213 of file sha1.cpp.
Referenced by Nektar::MetricFile::CalculateHash().