Code example for HashFunction

Methods: hashBytes

0
   * 
   * @param data data to hash 
   * @return 128 bits of hash result 
   */ 
  public byte[] hash(byte[] data) {
    HashCode hashCode = byteArrayHasher.hashBytes(data);
 
    return hashCode.asBytes();
  } 
 
  public long hashToLong(byte[] data) {
    HashCode hashCode = byteArrayHasher.hashBytes(data);
 
    return hashCode.asLong();
  } 
 
 
  /** 
   * A special version for long integers 
   *