Xo is experimental. The source is now public on GitHub, or try Xo in your browser.
Menu · fnv

Docs

std/fnv

On this page

Index

Functions

sum32

fn sum32(data: Bytes) -> Int

FNV-1 of data, 0 to 2^32 - 1 (Go’s New32().Sum32()).

Source: std/fnv.xo:8

sum32a

fn sum32a(data: Bytes) -> Int

FNV-1a of data, 0 to 2^32 - 1 (Go’s New32a).

Source: std/fnv.xo:10

sum64

fn sum64(data: Bytes) -> Int

FNV-1 of data, 64 bits: the Int’s bits are Go’s uint64, so a sum past 2^63 is negative (Go’s New64).

Source: std/fnv.xo:13

sum64a

fn sum64a(data: Bytes) -> Int

FNV-1a of data, 64 bits as sum64 (Go’s New64a).

Source: std/fnv.xo:15

sum128

fn sum128(data: Bytes) -> Bytes

FNV-1 of data, the 16 byte big endian sum (Go’s New128().Sum(nil)).

Source: std/fnv.xo:17

sum128a

fn sum128a(data: Bytes) -> Bytes

FNV-1a of data, 16 bytes as sum128 (Go’s New128a).

Source: std/fnv.xo:19

update32

fn update32(sum: Int, data: Bytes) -> Int

The 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).

Source: std/fnv.xo:24

update32a

fn update32a(sum: Int, data: Bytes) -> Int

Source: std/fnv.xo:25

update64

fn update64(sum: Int, data: Bytes) -> Int

Source: std/fnv.xo:26

update64a

fn update64a(sum: Int, data: Bytes) -> Int

Source: std/fnv.xo:27

update128

fn update128(sum: Bytes, data: Bytes) -> Bytes

update128 and update128a: sum is 16 bytes (faults otherwise).

Source: std/fnv.xo:29

update128a

fn update128a(sum: Bytes, data: Bytes) -> Bytes

Source: std/fnv.xo:30

↑ index