qLibc
|
Hash APIs. More...
Go to the source code of this file.
Functions | |
bool | qhashmd5 (const void *data, size_t nbytes, void *retbuf) |
Calculate 128-bit(16-bytes) MD5 hash. | |
bool | qhashmd5_file (const char *filepath, off_t offset, ssize_t nbytes, void *retbuf) |
Get 128-bit MD5 hash of a file contents. | |
uint32_t | qhashfnv1_32 (const void *data, size_t nbytes) |
Get 32-bit FNV1 hash. | |
uint64_t | qhashfnv1_64 (const void *data, size_t nbytes) |
Get 64-bit FNV1 hash integer. | |
uint32_t | qhashmurmur3_32 (const void *data, size_t nbytes) |
Get 32-bit Murmur3 hash. | |
bool | qhashmurmur3_128 (const void *data, size_t nbytes, void *retbuf) |
Get 128-bit Murmur3 hash. | |
Hash APIs.
Definition in file qhash.c.
bool qhashmd5 | ( | const void * | data, |
size_t | nbytes, | ||
void * | retbuf | ||
) |
Calculate 128-bit(16-bytes) MD5 hash.
data | source object |
nbytes | size of data |
retbuf | user buffer. It must be at leat 16-bytes long. |
bool qhashmd5_file | ( | const char * | filepath, |
off_t | offset, | ||
ssize_t | nbytes, | ||
void * | retbuf | ||
) |
Get 128-bit MD5 hash of a file contents.
filepath | file path |
offset | start offset. Set to 0 to digest from beginning of file. |
nbytes | number of bytes to digest. Set to 0 to digest until end of file. |
retbuf | user buffer. It must be at leat 16-bytes long. |
uint32_t qhashfnv1_32 | ( | const void * | data, |
size_t | nbytes | ||
) |
Get 32-bit FNV1 hash.
data | source data |
nbytes | size of data |
uint64_t qhashfnv1_64 | ( | const void * | data, |
size_t | nbytes | ||
) |
Get 64-bit FNV1 hash integer.
data | source data |
nbytes | size of data |
uint32_t qhashmurmur3_32 | ( | const void * | data, |
size_t | nbytes | ||
) |
Get 32-bit Murmur3 hash.
data | source data |
nbytes | size of data |
bool qhashmurmur3_128 | ( | const void * | data, |
size_t | nbytes, | ||
void * | retbuf | ||
) |
Get 128-bit Murmur3 hash.
data | source data |
nbytes | size of data |
retbuf | user buffer. It must be at leat 16-bytes long. |