← All notes

Go hash/fnv: FNV-1 and FNV-1a non-cryptographic hashes

Answer: The fnv package provides the FNV 1 and FNV 1a hashes, which are not cryptographic, from Fowler, Noll, and Vo.

FNV-1 and FNV-1a

These are the FNV 1 and FNV 1a functions named for Glenn Fowler, Landon Curt Noll, and Phong Vo.

Every hash.Hash implementation returned here can also marshal and unmarshal the internal state of the hash.

New32 returns a new 32-bit FNV 1 Hash, and New32a returns a new 32-bit FNV 1a Hash.

New64 and New64a return 64-bit FNV 1 and FNV 1a hashes, and New128 and New128a return 128-bit FNV 1 and FNV 1a hashes.

In each case, the Sum method lays the value out in big-endian byte order.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: The Go Authors, fnv package - hash/fnv; The Go Authors, fnv.go (source). BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: The Go Authors, fnv package - hash/fnv; The Go Authors, fnv.go (source). BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors.

Cite this

Permanent ID: iil:note:cb57d4c2

iinventedlight. 2026. "Go hash/fnv: FNV-1 and FNV-1a non-cryptographic hashes." iinventedlight Library, iil:note:cb57d4c2, version of 2026-11-26. https://iinventedlight.com/library/notes/go-hash-fnv/. License: CC-BY-4.0.

@misc{iil_note_cb57d4c2,
  author = {{iinventedlight}},
  title = {{Go hash/fnv: FNV-1 and FNV-1a non-cryptographic hashes}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-26},
  url = {https://iinventedlight.com/library/notes/go-hash-fnv/},
  note = {Permanent ID iil:note:cb57d4c2. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/go-hash-fnv.md.