Algorithms
FNV-1a (64-bit)
FNV-1a in 64 bits. XOR a byte and multiply by a prime and repeat. For tables and fingerprints
Hash / Non-cryptographic
FNV-1a (64-bit)
XOR, multiply, repeat. 64 bits of it.
- Digest
- 64-bit · 8 bytes
- HMAC
- no key mode
- Security
- NOT for security: simple hash for hash tables
- Family
- 4 in non-cryptographic
1 option, 0 required
Sample
- hex
- 779a65e7023cd2e7
- base64
- d5pl5wI80uc=
Options
Access
- Create
create("fnv1a") - CLI
hashes fnv1a 'hello world' - Tryplayground with the sample above
- Kincrc32, crc16-xmodem, xxhash
The simplest hash here: start from the offset basis, XOR in a byte, multiply by the FNV prime, repeat. Tiny, fast on short keys, and trivially attackable.
create("fnv1a").hash("").digest; // "cbf29ce484222325", the offset basis itself
create("fnv1a").hash("a").digest; // "af63dc4c8601ec8c"
64-bit only. The custom algorithms page builds the 32-bit one in fifteen lines, if that's what your format wants.