Module: Muk
- Defined in:
- lib/muk.rb
Overview
++ muk
Class Method Summary collapse
Class Method Details
.muk(syd, key) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/muk.rb', line 7 def self.muk(syd, key) # Extract the least significant byte and the second byte lo = key & 0xff hi = (key >> 8) & 0xff # Create a string from these two bytes kee = [lo, hi].pack("CC") # Use murmurhash3 gem to compute the hash MurmurHash3::V32.str_hash(kee, syd) end |