Android Hash Code Calculate getHashCode(final byte... pBytes)

Here you can find the source of getHashCode(final byte... pBytes)

Description

get Hash Code

Declaration

public static int getHashCode(final byte... pBytes) 

Method Source Code

//package com.java2s;

public class Main {
    public static int getHashCode(final byte... pBytes) {
        final int prime = 31;
        int result = 1;

        for (int i = 0; i < pBytes.length; i++) {
            result = prime * result + pBytes[i];
        }//from   w w  w .  j a  v a  2s .c  om

        return result;
    }

    public static int getHashCode(final Object... pObjects) {
        final int prime = 31;
        int result = 1;

        for (int i = 0; i < pObjects.length; i++) {
            final Object object = pObjects[i];
            result = prime * result
                    + ((object == null) ? 0 : object.hashCode());
        }

        return result;
    }
}

Related

  1. hashPointOfInterestMessage(String phone, double latitude, double longitude, String title, String description)
  2. computeWeakHash(String string)
  3. computeWeakHash(String string)
  4. getHash(String text)
  5. getHashCode(final Object... pObjects)
  6. getHashStringFromId(String id)
  7. getHexDigit(String s, int i)
  8. createHash(String title, String URL, String content)
  9. createHash(String toHash)