prg_bin_hash_bytes_array()
Abstract
Gets the hash value for a block of binary data organized as an array of bytes.
Syntax
prg_bin_hash_bytes_array (bytes_array, num_bytes)
| Argument | Type | Description |
|---|---|---|
bytes_array |
unsigned char * |
Binary data block. |
num_bytes |
int |
Number of bytes in bytes_array. |
Return Type
int
Hash value.
Header
prg_bin_hash.h
Details
This function computes a 32-bit hash value for a binary key represented as an unaligned array of bytes (bytes_array). The length of the key, in bytes, is given by num_bytes.
If the size of the binary data block is a multiple of 4, prg_bin_hash_int_array() will provide faster results.
WARNING: This function is MT unsafe, as described in “Multi-Threading Safety“ on page 11. Access to shared hash tables must be externally serialized.