Death::Cryptography namespace

Cryptographic and hashing utilities.

Provides cryptographic services, including secure encoding and decoding of data, as well as many other operations, such as hashing, random number generation, and message authentication.

Functions

auto xxHash3(const void* data, std::size_t length) -> std::uint64_t
Computes 64-bit digest of given data using the xxHash3 algorithm.
auto xxHash3(const void* data, std::size_t length, std::uint64_t seed) -> std::uint64_t
Computes 64-bit digest of given data using the xxHash3 algorithm with a custom seed.

Function documentation

std::uint64_t Death::Cryptography::xxHash3(const void* data, std::size_t length)

Computes 64-bit digest of given data using the xxHash3 algorithm.

Parameters
data Pointer to the beginning of the input buffer
length Length of the input buffer in bytes
Returns 64-bit hash of the input

xxHash3 is a fast, non-cryptographic hash function well suited for hash tables, checksums and content deduplication — it is not intended for security-sensitive use. The result depends only on the byte contents of the buffer, so hashing the same bytes always yields the same value. Passing nullptr with zero length is valid and returns the hash of an empty input.

std::uint64_t Death::Cryptography::xxHash3(const void* data, std::size_t length, std::uint64_t seed)

Computes 64-bit digest of given data using the xxHash3 algorithm with a custom seed.

Parameters
data Pointer to the beginning of the input buffer
length Length of the input buffer in bytes
seed Seed value that alters the resulting hash

Unlike xxHash3(const void*, std::size_t), this overload mixes seed into the computation, so different seeds produce independent hashes of the same input — useful for seeded hash tables or to reduce the chance of collisions being exploited.