3 ms·
For regular hashing it makes no difference For cryptographic hashing it may make a difference, depending on the context.
by raverbashing 14y ago
For regular hashing it makes no difference
For cryptographic hashing it may make a difference, depending on the context.
- tripzilch 14y agoIn fact, for regular hashing you're probably better off using a non-cryptographic hash in the first place, because they're much faster. Instead of security, they're designed for avalanche behaviour and uniformity of the hash space. Cryptographic hashes also cover these design constraints (otherwise they'd be vulnerable), but a hash does not need to be cryptographic strength to be a really good algo to generate hash keys from blobs. Murmurhash and Cityhash are two excellent and fast non-crypto hashes. The FNV hash is also quite good, very fast, maybe not as good as Murmer and City, but has the advantage that if you like running your own, it's super-easy to implement (like two lines of C code easy). FNV hash http://www.isthe.com/chongo/tech/comp/fnv/index.html http://www.isthe.com/chongo/tech/comp/fnv/index.html Murmur hash http://en.wikipedia.org/wiki/MurmurHash http://en.wikipedia.org/wiki/MurmurHash City hash http://en.wikipedia.org/wiki/CityHash http://en.wikipedia.org/wiki/CityHash In case you're interested, here's two great explanations of what to look for in general purpose hashes (avalanche behaviour and uniformity): http://bretm.home.comcast.net/~bretm/hash/ http://bretm.home.comcast.net/~bretm/hash/ and http://www.partow.net/programming/hashfunctions/index.html http://www.partow.net/programming/hashfunctions/index.html