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
- id: C1 claim: The package implements FNV-1 and FNV-1a, which are non-cryptographic hashes. source: S1 evidence: "Package fnv implements FNV-1 and FNV-1a, non-cryptographic hash functions"
- id: C2 claim: The returned hashes can marshal and unmarshal their internal state. source: S1 evidence: "marshal and unmarshal the internal state of the hash."
- id: C3 claim: Sum writes the digest in big-endian byte order. source: S2 evidence: "Its Sum method will lay the value out in big-endian byte order."
Sources
- [S1] fnv package - hash/fnv. The Go Authors. https://pkg.go.dev/hash/fnv . License: BSD-3-Clause. Accessed 2026-11-26.
- [S2] fnv.go (source). The Go Authors. https://go.dev/src/hash/fnv/fnv.go . License: BSD-3-Clause. Accessed 2026-11-26.
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
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.},
}
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.
- go-hash-fnv.schema.json (schema; CC-BY-4.0)
- go-hash-fnv.table.json (table; CC-BY-4.0)
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.