From 434a20bcbc306ffb484c4a38e99ca82de2c0e08b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 9 Feb 2014 09:22:52 +0000 Subject: add siphash24 It's the preferred hash function nowadays by Ruby itself, so it probably makes sense to add it --- Hash_Functions | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'Hash_Functions') diff --git a/Hash_Functions b/Hash_Functions index 623bfab..e285120 100644 --- a/Hash_Functions +++ b/Hash_Functions @@ -19,6 +19,16 @@ corruption, so don't do it. {lookup3 hash}[http://www.burtleburtle.net/bob/c/lookup3.c]. :hash => :jenkins_lookup3 +== SipHash + +https://en.wikipedia.org/wiki/Sip_Hash +https://131002.net/siphash/ + +Currently (as of Ruby 2.1) the favored hash in Ruby for hash-flooding +protection. + +* :siphash24 - the reference implementation + == Murmur family The {Murmur}[https://sites.google.com/site/murmurhash/] family of hashes @@ -63,7 +73,6 @@ other architectures). == Bernstein hashes -* :djb3 - The hash currently favored by Bernstein. - See http://www.cse.yorku.ca/~oz/hash.html +* :djb3 - See http://www.cse.yorku.ca/~oz/hash.html * :djb2 - See http://www.cse.yorku.ca/~oz/hash.html -- cgit v1.2.3-24-ge0c7