Java Array Hash Code hashCode(byte[] bytes)

Here you can find the source of hashCode(byte[] bytes)

Description

This function calculates a hash code for the specified byte array.

License

Open Source License

Parameter

Parameter Description
bytes The byte array.

Return

The hash code.

Declaration

static public int hashCode(byte[] bytes) 

Method Source Code

//package com.java2s;
/************************************************************************
 * Copyright (c) Crater Dog Technologies(TM).  All Rights Reserved.     *
 ************************************************************************
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.        *
 *                                                                      *
 * This code is free software; you can redistribute it and/or modify it *
 * under the terms of The MIT License (MIT), as published by the Open   *
 * Source Initiative. (See http://opensource.org/licenses/MIT)          *
 ************************************************************************/

import java.util.Arrays;

public class Main {
    /**//  www . j  a  v a 2s  . co  m
     * This function calculates a hash code for the specified byte array.
     *
     * @param bytes The byte array.
     * @return The hash code.
     */
    static public int hashCode(byte[] bytes) {
        int hash = Arrays.hashCode(bytes);
        return hash;
    }
}

Related

  1. arrayHashCode(Object[] objects)
  2. byteArrayHashCode(final byte[] array)
  3. calculateHash(byte[] data)
  4. deepHash(Object[] t)
  5. deepHashCode(double[][] matrix)
  6. hashCode(byte[] obj)
  7. hashCode(final Object[] array1)
  8. hashCode(Map a)
  9. hashCode(Object array)