Here you can find the source of areEqual(byte[] a, byte[] b)
public static boolean areEqual(byte[] a, byte[] b)
//package com.java2s; // the terms and conditions of the Cryptix General Licence. You should have public class Main { public static boolean areEqual(byte[] a, byte[] b) { int aLength = a.length; if (aLength != b.length) return false; for (int i = 0; i < aLength; i++) if (a[i] != b[i]) return false; return true; }//from www. j a v a2s.c om }