xxhash64Of

Compute xxHash-64 of input string data, with optional seed seed.

  1. ulong xxhash64Of(ubyte[] data, ulong seed)
  2. ulong xxhash64Of(char[] data, ulong seed)
    @safe pure nothrow @nogc @trusted
    ulong
    xxhash64Of
    (
    in char[] data
    ,
    ulong seed = 0
    )

Examples

test simple xxhash64Of

assert(xxhash64Of("") == 17241709254077376921UL);

ubyte[8] x = [1, 2, 3, 4, 5, 6, 7, 8];
assert(xxhash64Of(x[]) == 9316896406413536788UL);

// tests copied from https://pypi.python.org/pypi/xxhash/0.6.0
assert(xxhash64Of(`xxhash`) == 3665147885093898016UL);
assert(xxhash64Of(`xxhash`, 20141025) == 13067679811253438005UL);

Meta