Here you can find the source of keyAreEqual(byte[] b1, byte[] b2)
public static boolean keyAreEqual(byte[] b1, byte[] b2)
//package com.java2s; public class Main { /**/*ww w.j av a 2 s . c o m*/ * compare if the given two keys are equal */ public static boolean keyAreEqual(byte[] b1, byte[] b2) { if (b1.length != b2.length) { return false; } for (int i = 0; i < b1.length; i++) { if (b1[i] != b2[i]) { return false; } } return true; } }