Fnv1Generic.fnv1_hex

Calculates a FNV1/FNV1a digest from data and generates a hexdecimal string representation of the digest. data are processed in octet/byte-wise manner.

Usage:

import ocean.io.digest.Fnv;

Fnv32.HexDigest digest32;
Fnv64.HexDigest digest64;

auto data = "sociomantic";

digest32 = Fnv32.fnv1(data, digest32);
digest64 = Fnv64.fnv1(data, digest32);
class Fnv1Generic(bool FNV1A = false, T = hash_t)
static
char[]
fnv1_hex
(
U
)
(,
char[] hexdgst
,
DigestType digest = INIT
)

Parameters

data U

data to digest

hexdgst char[]

string buffer

digest DigestType

initial digest; defaults to the magic 32 bit or 64 bit initial value, according to DigestType

Return Value

Type: char[]

hexdecimal string representation of resulting digest

Meta