StaticFnv1a

Compile time fnv1a hash function, calculates a hash value of type T where T must be uint or ulong.

Convenience aliases for 32 bit (T = uint) or 64 bit (T = ulong) hashes are defined below. They have to appear after this template definition because DMD can currently (v1.075) not handle forward aliases in this case.

Members

Templates

Fnv1a
template Fnv1a(istring input)

Calculates the Fnv1a hash value of type T from input.

Fnv1a
template Fnv1a(T hash, istring input)

Calculates the Fnv1a hash value of type T from input using hash as initial hash value.

Parameters

T

Type of hash to use, should be uint or ulong, or any alias to them. Defaults to hash_t, which is a D alias to size_t.

Meta