Returns a long array of size 2, which is a 128-bit hash of the input.

@param key The input long[] array. Must be non-null and non-empty.
@param seed A long valued seed.
@return the hash.
766001
public static long[] hash(final long[] key, final long seed) {
    final HashState hashState = new HashState(seed, seed);
    final int longs = key.length; //in longs

    // Number of full 128-bit blocks of 2 longs (the body).
    // Possible exclusion of a remainder of 1 long.
    final int nblocks = longs >>> 1; //longs / 2

    // Process the 128-bit blocks (the body) into the hash
    for (int i = 0; i < nblocks; i++ ) {
      final long k1 = key[i << 1]; //0, 2, 4, ...
      final long k2 = key[(i << 1) + 1]; //1, 3, 5, ...
      hashState.blockMix128(k1, k2);
    }

    // Get the tail index, remainder length
    final int tail = nblocks << 1; // 2 longs / block
    final int rem = longs - tail; // remainder longs: 0,1

    // Get the tail
    final long k1 = (rem == 0) ? 0 : key[tail]; //k2 -> 0
    // Mix the tail into the hash and return
    return hashState.finalMix128(k1, 0, longs << 3); //convert to bytes
  }
599114
public static int hash(ByteBuffer buf, int seed) {
		  
	    // save byte order for later restoration
	    ByteOrder byteOrder = buf.order();
	    buf.order(ByteOrder.LITTLE_ENDIAN);

		  int m = 0x5bd1e995;
		  int r = 24;

	    int h = seed ^ buf.remaining();
	    
	    while (buf.remaining() >= 4) {
	    	
	    	int k = buf.getInt();
	    	
	    	k *= m;
	    	k ^= k >>> r;
	    	k *= m;
	    	h *= m;
	    	h ^= k;
	    }

	    if (buf.remaining() > 0) {
	      ByteBuffer finish = ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN);
	      // for big-endian version, use this first:
	      // finish.position(4-buf.remaining());
	      finish.put(buf).rewind();
	      h ^= finish.getInt();
	      h *= m;
	    }

	    h ^= h >>> 13;
	    h *= m;
	    h ^= h >>> 15;

	    buf.order(byteOrder);
	    return h;
	  }
25874
@Override
  public Long zcard(final byte[] key) {
    checkIsInMultiOrPipeline();
    client.zcard(key);
    return client.getIntegerReply();
  }
549605
public static int getPodHash(String key)
  {
    byte []buffer = new byte[16];
    
    int sublen = Math.min(key.length(), 8);
    
    for (int i = 0; i < sublen; i++) {
      buffer[i] = (byte) key.charAt(i);
    }
    
    long hash = Murmur64.generate(Murmur64.SEED, key);
    
    BitsUtil.writeLong(buffer, 8, hash);
    
    return calculatePodHash(buffer, 0, 16);
  }
355888
private static long hashLength65Plus(byte[] bytes, int offset, int length) {
        final int seed = 81;
        // For strings over 64 bytes we loop. Internal state consists of 56 bytes: v, w, x, y, and z.
        long x = seed;
        // @SuppressWarnings("ConstantOverflow")
        long y = seed * K1 + 113;
        long z = shiftMix(y * K2 + 113) * K2;
        long[] v = new long[2], w = new long[2];
        x = x * K2 + load64(bytes, offset);

        // Set end so that after the loop we have 1 to 64 bytes left to process.
        int end = offset + ((length - 1) / 64) * 64;
        int last64offset = end + ((length - 1) & 63) - 63;
        do {
            x = rotateRight(x + y + v[0] + load64(bytes, offset + 8), 37) * K1;
            y = rotateRight(y + v[1] + load64(bytes, offset + 48), 42) * K1;
            x ^= w[1];
            y += v[0] + load64(bytes, offset + 40);
            z = rotateRight(z + w[0], 33) * K1;
            weakHashLength32WithSeeds(bytes, offset, v[1] * K1, x + w[0], v);
            weakHashLength32WithSeeds(bytes, offset + 32, z + w[1], y + load64(bytes, offset + 16), w);
            long tmp = x;
            x = z;
            z = tmp;
            offset += 64;
        } while (offset != end);
        long mul = K1 + ((z & 0xFF) << 1);
        // Operate on the last 64 bytes of input.
        offset = last64offset;
        w[0] += ((length - 1) & 63);
        v[0] += w[0];
        w[0] += v[0];
        x = rotateRight(x + y + v[0] + load64(bytes, offset + 8), 37) * mul;
        y = rotateRight(y + v[1] + load64(bytes, offset + 48), 42) * mul;
        x ^= w[1] * 9;
        y += v[0] * 9 + load64(bytes, offset + 40);
        z = rotateRight(z + w[0], 33) * mul;
        weakHashLength32WithSeeds(bytes, offset, v[1] * mul, x + w[0], v);
        weakHashLength32WithSeeds(bytes, offset + 32, z + w[1], y + load64(bytes, offset + 16), w);
        return hashLength16(hashLength16(v[0], w[0], mul) + shiftMix(y) * K0 + x, hashLength16(v[1], w[1], mul) + z, mul);
    }
679738
public MatchIterator get(long key, int hashCode) {
		int bucket = hashCode & numBucketsMask;

		int bucketOffset = bucket << 4;
		MemorySegment segment = buckets[bucketOffset >>> segmentSizeBits];
		int segOffset = bucketOffset & segmentSizeMask;

		while (true) {
			long address = segment.getLong(segOffset + 8);
			if (address != INVALID_ADDRESS) {
				if (segment.getLong(segOffset) == key) {
					return valueIter(address);
				} else {
					bucket = (bucket + 1) & numBucketsMask;
					if (segOffset + 16 < segmentSize) {
						segOffset += 16;
					} else {
						bucketOffset = bucket << 4;
						segOffset = bucketOffset & segmentSizeMask;
						segment = buckets[bucketOffset >>> segmentSizeBits];
					}
				}
			} else {
				return valueIter(INVALID_ADDRESS);
			}
		}
	}
146282
def pbkdf2(seed: str or bytes, dk_len: int) -> bytes:
    
    key = b''
    index = 1
    bytes_seed = str_to_bytes(seed)
    while len(key) < dk_len:
        key += Digest.sha256(b''.join([bytes_seed, index.to_bytes(4, 'big', signed=True)]))
        index += 1
    return key[:dk_len]
534771
public Object get(long key)
  {
    int hash = (int) (key & mask);

    while (true) {
      long mapKey = keys[hash];

      if (mapKey == key)
        return values[hash];
      else if (mapKey == DEAD_KEY) {
        if ((flags[hash] & DELETED) == 0)
          return null;
      }

      hash = (hash + 1) & mask;
    }
  }
975296
public static long[] hash(final double in, final long seed, final long[] hashOut) {
    final double d = (in == 0.0) ? 0.0 : in;    // canonicalize -0.0, 0.0
    final long k1 = Double.doubleToLongBits(d); // canonicalize all NaN forms
    final long h1 = seed ^ mixK1(k1);
    final long h2 = seed;
    return finalMix128(h1, h2, 8, hashOut);
  }
123295
@Override
  public Long hlen(final byte[] key) {
    checkIsInMultiOrPipeline();
    client.hlen(key);
    return client.getIntegerReply();
  }
865608
protected static final void setRSAKey(byte[][] key) {
        BigInteger[] k = new BigInteger[8];
        for (int i = 0; i < 8; i++) {
            if (key[i] != null) {
                k[i] = new BigInteger(1, key[i]);
            }
        }

        if (k[3].compareTo(k[4]) < 0) {
            BigInteger tmp;
            tmp = k[3];
            k[3] = k[4];
            k[4] = tmp;
            tmp = k[5];
            k[5] = k[6];
            k[6] = tmp;
            k[7] = null;
        }
        if (k[7] == null) {
            k[7] = k[4].modInverse(k[3]);
        }
        if (k[0] == null) {
            k[0] = k[3].multiply(k[4]);
        }
        if (k[1] == null) {
            k[1] = k[2].modInverse(k[3].subtract(BigInteger.valueOf(1)).multiply(k[4].subtract(BigInteger.valueOf(1))));
        }
        if (k[5] == null) {
            k[5] = k[1].remainder(k[3].subtract(BigInteger.valueOf(1)));
        }
        if (k[6] == null) {
            k[6] = k[1].remainder(k[4].subtract(BigInteger.valueOf(1)));
        }
        for (int i = 0; i < 8; i++) {
            key[i] = k[i].toByteArray();
        }

    }
950098
public boolean containsKey(final long key) {
        int index = longHash(key, mask);
        while (null != values[index]) {
            if (key == keys[index]) {
                return true;
            }
            index = ++index & mask;
        }
        return false;
    }
691030
public static long[] hashToLongs(final double datum, final long seed) {
    final double d = (datum == 0.0) ? 0.0 : datum; //canonicalize -0.0, 0.0
    final long[] data = { Double.doubleToLongBits(d) };//canonicalize all NaN forms
    return hash(data, seed);
  }
1071414
public byte[] getByteArray(final String key) {
		final String[] value = getArray(key);
		if (value != null) {
			final byte[] result = new byte[value.length];
			for (int i = 0; i < value.length; i++) {
				result[i] = Byte.parseByte(value[i]);
			}
			return result;
		}
		return null;
	}
751826
public long getUsedBytesOnTiersOrThrow(
      java.lang.String key) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.Long> map =
        internalGetUsedBytesOnTiers().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }
320625
public String hash(String key) {
        if (digester != null) {
            byte[] bytes = digester.digest(key.getBytes());
            return bytesToHexString(bytes);
        } else {
            return Integer.toHexString(key.hashCode());
        }
    }
1283521
@Override
    long next(long seed) {
        seed = seed ^ seed << 21;
        seed = seed ^ seed >>> 35;
        return seed ^ seed << 4;
    }