

Go to the source code of this file.
Functions | |
| PROMEKI_NAMESPACE_BEGIN constexpr uint64_t | fnv1a (const char *s, uint64_t seed=0xcbf29ce484222325ULL) |
| Computes the FNV-1a hash of a null-terminated string at compile time. | |
| constexpr uint64_t | fnv1aData (const void *data, size_t len, uint64_t seed=0xcbf29ce484222325ULL) |
| Computes the FNV-1a hash of a block of data. | |
See LICENSE file in the project root folder for license information.
|
constexpr |
Computes the FNV-1a hash of a block of data.
Iterates over a byte range and applies the FNV-1a mixing step to each byte. The function is constexpr for use in constant expressions.
| data | Pointer to the input data. |
| len | Length of the input data in bytes. |
| seed | Initial hash value (defaults to the FNV offset basis). |