FNV64A

Undocumented in source.
alias FNV64A = FNV!(64, true)

Examples

import std.conv : hexString;
// alias FNV32Digest = WrapperDigest!FNV32; /// OOP API for 32bit FNV-1
// alias FNV64Digest = WrapperDigest!FNV64; /// OOP API for 64bit FNV-1
alias FNV32ADigest = WrapperDigest!FNV32A; /// OOP API for 32bit FNV-1a
// alias FNV64ADigest = WrapperDigest!FNV64A; /// OOP API for 64bit FNV-1a

const immutable(char)[5] hello = "hello";

FNV64 fnv64;
fnv64.start();
fnv64.put(cast(ubyte[])hello[]);
assert(toHexString(fnv64.finish()) == "7B495389BDBDD4C7");

fnv64.putStaticArray(cast(ubyte[5])hello);
assert(toHexString(fnv64.finish()) == "7B495389BDBDD4C7");

// Template API
assert(digest!FNV32("abc") == hexString!"439C2F4B");
assert(digest!FNV64("abc") == hexString!"D8DCCA186BAFADCB");
assert(digest!FNV32A("abc") == hexString!"1A47E90B");
assert(digest!FNV64A("abc") == hexString!"E71FA2190541574B");

// OOP API
Digest fnv = new FNV32ADigest;
ubyte[] d = fnv.digest("1234");
assert(d == hexString!"FDC422FD");

Meta