std/fnv
On this page
Index
- fn
sum32 - fn
sum32a - fn
sum64 - fn
sum64a - fn
sum128 - fn
sum128a - fn
update32 - fn
update32a - fn
update64 - fn
update64a - fn
update128 - fn
update128a
Functions
sum32
fn sum32(data: Bytes) -> IntFNV-1 of data, 0 to 2^32 - 1 (Go’s New32().Sum32()).
sum32a
fn sum32a(data: Bytes) -> IntFNV-1a of data, 0 to 2^32 - 1 (Go’s New32a).
sum64
fn sum64(data: Bytes) -> IntFNV-1 of data, 64 bits: the Int’s bits are Go’s uint64, so a sum past 2^63 is negative (Go’s New64).
sum64a
fn sum64a(data: Bytes) -> IntFNV-1a of data, 64 bits as sum64 (Go’s New64a).
sum128
fn sum128(data: Bytes) -> BytesFNV-1 of data, the 16 byte big endian sum (Go’s New128().Sum(nil)).
sum128a
fn sum128a(data: Bytes) -> BytesFNV-1a of data, 16 bytes as sum128 (Go’s New128a).
update32
fn update32(sum: Int, data: Bytes) -> IntThe sum of what sum was the hash of, followed by data, for hashing a
piece at a time (Go’s Write on the same hash):
update32(sum32(a), b) == sum32(a + b).
update32a
fn update32a(sum: Int, data: Bytes) -> Intupdate64
fn update64(sum: Int, data: Bytes) -> Intupdate64a
fn update64a(sum: Int, data: Bytes) -> Intupdate128
fn update128(sum: Bytes, data: Bytes) -> Bytesupdate128 and update128a: sum is 16 bytes (faults otherwise).
update128a
fn update128a(sum: Bytes, data: Bytes) -> Bytes