class CrystalFnv::Hash
- CrystalFnv::Hash
 - Reference
 - Object
 
Defined in:
crystal_fnv.crConstant Summary
- 
        MASK = 
{32 => 4294967295_i64, 64 => 18446744073709551615_u64} - 
        OFFSET_BASIS = 
{32 => 2166136261_i64, 64 => 14695981039346656037_u64} - 
        PRIME = 
{32 => 16777619, 64 => 1099511628211_i64} 
Class Method Summary
- 
        .fnv_1(item, size = 32)
        
          
Calculates the FNV-1 hash for the given item value
 - 
        .fnv_1a(item, size = 32)
        
          
Calculates the FNV-1a hash for the given item value
 
Class Method Detail
        
        def self.fnv_1(item, size = 32)
        #
      
      
        Calculates the FNV-1 hash for the given item value
@param item The item to hash @param size [Integer] the size of the resulting hash
@return [Integer] the calculated hash value
        
        def self.fnv_1a(item, size = 32)
        #
      
      
        Calculates the FNV-1a hash for the given item value
@param item The item to hash @param size [Integer] the size of the resulting hash
@return [Integer] the calculated hash value