Skip to content

robinheghan/fnv1a

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FNV-1a

This package lets you hash strings using the FNV-1a algorithm.

FNV is a non-cryptographic hash function. It favors speed over security. Do not rely on this hash function to keep passwords or other sensitive information safe.

In addition to being fast, it also has good avalanche characteristics. This means that small variations in the string become large variations in the hash. In other words, two strings like "common1" and "common2" will end up with two very different hash values, even though they are quite similar.

Hashing equal strings will return the same hash value. Hashing inequal strings should ideally return inequal hash values. In reality, because you're mapping a potentially endless string into a 32-bit bound integer, collisions do occur.

Read more about how FNV-1a compares against other hash functions.

You can also read more about how FNV-1a is a good hash function for Elm.

About

An Elm implementation of the FNV-1a hash function

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages