Here you can find the source of hashCode(byte[] bytes)
Parameter | Description |
---|---|
bytes | The byte array. |
static public int hashCode(byte[] bytes)
//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; } }