Hawkynt

FNV-1a

FNV-1a is a fast non-cryptographic hash function with good distribution properties. It uses simple multiply and XOR operations for high performance.

Properties

Property Value
Category Hash Functions
Sub-category Fast Hash
Security status πŸŽ“ Educational Only
Complexity Not specified
Inventor Glenn Fowler, Landon Curt Noll, Phong Vo
Year 1991
Origin πŸ‡ΊπŸ‡Έ United States
Source algorithms/hash/fnv.js

Parameters

Parameter Supported values
Output sizes 4 bytes (32 bits)

Security

Status: πŸŽ“ Educational Only

No vulnerabilities are recorded for this implementation.

Documentation

References

Test vectors

3 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.

Vector 1 β€” FNV-1a Test Vector - Empty string

Field Value
input (empty)
expected 811c9dc5

Vector 2 β€” FNV-1a Test Vector - β€˜a’

Field Value
input 61
expected e40c292c

Vector 3 β€” FNV-1a Test Vector - β€˜foobar’

Field Value
input 666f6f626172
expected bf9cf968

← All algorithms