Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
philipsoutham committed Oct 8, 2015
1 parent a56da7f commit f9a9c0d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# scala-fnv
Implements FNV-1 and FNV-1a, non-cryptographic hash functions created by Glenn Fowler, Landon Curt Noll, and Phong Vo.
See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function.

```scala
import com.philipsoutham.hash.FNV

val data = "Hello, world!".getBytes

FNV.hash32(data) // BigInt = 3897470310
FNV.hash32a(data) // BigInt = 3985698964
FNV.hash64(data) // BigInt = 7285062107457560934
FNV.hash64a(data) // BigInt = 4094109891673226228
```

Test cases were taken from [here](http://www.isthe.com/chongo/src/fnv/test_fnv.c).

0 comments on commit f9a9c0d

Please sign in to comment.