Hashes byte array.

@return Hash of the given byte array.
435385
protected String hashByteArray(byte[] data) {
        if (mCRC32 != null) {
            return hashCRC32(data);
        } else if (mHashAlgorithm != null) {
            return messageDigest(data);
        } else {
            // Default.
            return hashCRC32(data);
        }
    }
1211642
int hash(ByteBuffer indices, ByteBuffer vertices, ByteBuffer normals, ByteBuffer colors) {
		int hashCode = 0;
		hashCode += indices.hashCode();
		hashCode += vertices.hashCode();
		hashCode += normals.hashCode();
		hashCode += colors.hashCode();
		
		return hashCode;
	}
1228664
public byte[] toByteArray()
	{
		final byte[] data = new byte[7];
		data[0] = (byte) oindex;
		data[1] = (byte) id;
		data[2] = (byte) pindex;
		data[3] = (byte) (write ? 0x80 : 0x00);
		data[3] |= pdt & 0x3f;
		data[4] = (byte) (maxElems >> 8);
		data[5] = (byte) maxElems;
		data[6] = (byte) (rLevel << 4 | (wLevel & 0x0f));
		return data;
	}
1004711
static String getMd5Hash(byte[] bytes) throws NoSuchAlgorithmException {

        String hash;
        try {
            MessageDigest md = MessageDigest.getInstance("MD5");
            md.update(bytes);
            byte[] digest = md.digest();

            char[] hexCode = "0123456789ABCDEF".toCharArray();
            StringBuilder r = new StringBuilder(digest.length * 2);
            for (byte b : digest) {
                r.append(hexCode[(b >> 4) & 0xF]);
                r.append(hexCode[(b & 0xF)]);
            }

            hash = r.toString().toUpperCase();
        }catch (NoSuchAlgorithmException e){
            throw e;
        }
        return hash;
    }
389655
@Override
	public long hash64() {
		final byte[] urlBuffer = url.elements();
		final int startOfHost = BURL.startOfHost(urlBuffer);
		return MurmurHash3.hash(urlBuffer, startOfHost, BURL.lengthOfHost(urlBuffer, startOfHost));
	 }
251583
public static byte[] hash(byte[] input, int offset, int length) {
        MessageDigest digest = newDigest();
        digest.update(input, offset, length);
        return digest.digest();
    }
964216
public byte[] toByteArray()
    {
        byte[] b = new byte[size()];
        unsafe.copyMemory(base, address, b, ARRAY_BYTE_BASE_OFFSET, size());
        return b;
    }
859472
public long hash(Collection<? extends CharSequence> segList) {
		final int bitNum = this.bitNum;
		// 按照词语的hash值，计算simHashWeight(低位对齐)
		final int[] weight = new int[bitNum];
		long wordHash;
		for (CharSequence seg : segList) {
			wordHash = MurmurHash.hash64(seg);
			for (int i = 0; i < bitNum; i++) {
				if (((wordHash >> i) & 1) == 1)
					weight[i] += 1;
				else
					weight[i] -= 1;
			}
		}

		// 计算得到Simhash值
		final StringBuilder sb = new StringBuilder();
		for (int i = 0; i < bitNum; i++) {
			sb.append((weight[i] > 0) ? 1 : 0);
		}

		return new BigInteger(sb.toString(), 2).longValue();
	}
876090
public static DataHash hash(HashAlgorithm hashAlgorithm, byte[] left, byte[] right, long level) throws HashException {
        DataHasher hasher = new DataHasher(hashAlgorithm);
        hasher.addData(left).addData(right);
        hasher.addData(com.guardtime.ksi.util.Util.encodeUnsignedLong(level));
        return hasher.getHash();
    }
604947
public final DataHash getHash() {
        if (outputHash == null) {
            byte[] hash = messageDigest.digest();
            outputHash = new DataHash(algorithm, hash);
        }
        return outputHash;
    }
940535
public static byte[] hashTwice(byte[] input1, byte[] input2) {
        MessageDigest digest = newDigest();
        digest.update(input1);
        digest.update(input2);
        return digest.digest(digest.digest());
    }
1256900
def array_to_hash(array)
      case array
        when self.class
          array.to_hash
        when Array
          array.map { |element| array_to_hash(element) }
        else
          array
      end
    end
82904
public static int hash32(byte[] data, int length, int seed) {
        int hash = seed;
        final int nblocks = length >> 2;

        // body
        for (int i = 0; i < nblocks; i++) {
            int i_4 = i << 2;
            int k = (data[i_4] & 0xff)
                | ((data[i_4 + 1] & 0xff) << 8)
                | ((data[i_4 + 2] & 0xff) << 16)
                | ((data[i_4 + 3] & 0xff) << 24);

            // mix functions
            k *= C1_32;
            k = Integer.rotateLeft(k, R1_32);
            k *= C2_32;
            hash ^= k;
            hash = Integer.rotateLeft(hash, R2_32) * M_32 + N_32;
        }

        // tail
        int idx = nblocks << 2;
        int k1 = 0;
        switch (length - idx) {
            case 3:
                k1 ^= data[idx + 2] << 16;
            case 2:
                k1 ^= data[idx + 1] << 8;
            case 1:
                k1 ^= data[idx];

                // mix functions
                k1 *= C1_32;
                k1 = Integer.rotateLeft(k1, R1_32);
                k1 *= C2_32;
                hash ^= k1;
        }

        // finalization
        hash ^= length;
        hash ^= (hash >>> 16);
        hash *= 0x85ebca6b;
        hash ^= (hash >>> 13);
        hash *= 0xc2b2ae35;
        hash ^= (hash >>> 16);

        return hash;
    }
497814
public byte[] hash(byte[] data) throws SdkClientException {
        try {
            MessageDigest md =  getMessageDigestInstance();
            md.update(data);
            return md.digest();
        } catch (Exception e) {
            throw new SdkClientException(
                    "Unable to compute hash while signing request: "
                            + e.getMessage(), e);
        }
    }
929104
public int hash() {
		hash ^= 4 * count;
		hash ^= hash >>> 16;
		hash *= 0x85ebca6b;
		hash ^= hash >>> 13;
		hash *= 0xc2b2ae35;
		hash ^= hash >>> 16;

		return hash;
	}
125047
def to_hash
      Hash[options.reject(&:null?).map { |o| [o.key, o.value] }]
    end
119678
public static synchronized byte[] addressHash(byte[] pubkeyBytes) {
      try {
         byte[] sha256 = MessageDigest.getInstance(SHA256).digest(pubkeyBytes);
         byte[] out = new byte[20];
         ripeMD160.update(sha256, 0, sha256.length);
         ripeMD160.doFinal(out, 0); // This also resets the hash function for
                                    // next use
         return out;
      } catch (NoSuchAlgorithmException e) {
         throw new RuntimeException(e); // Cannot happen.
      }
   }