src/main/java/com/ve/cxe/commons/util/ByteUtils.java
/**
     * Performs a byte array comparison with a constant time
     *
     * @param a A byte array
     * @param b Another byte array
     * @return True if the byte array have equal contents
     * <p/>
     * Suitable for strong full length passcode byte comparison
     */
Performs a byte array comparison with a constant time
@param a A byte array
@param b Another byte array
@return True if the byte array have equal contents

Suitable for strong full length passcode byte comparison
Performs a byte array comparison with a constant time @param a A byte array @param b Another byte array @return True if the byte array have equal contents Suitable for strong full length passcode byte comparison
public static boolean fullByteCompare(byte[] a, byte[] b) {
        if (a == null || b == null || a.length != b.length) {
            return false;
        } else {
            int result = 0;
            for (int i = 0; i < a.length; i++) {
                result |= a[i] ^ b[i];
            }
            return result == 0;
        }
    }
public static boolean fullByteCompare ( byte [ ] a , byte [ ] b ) { if ( a == null || b == null || a . length != b . length ) { return false ; } else { int result = 0 ; for ( int i = 0 ; i < a . length ; i ++ ) { result |= a [ i ] ^ b [ i ] ; } return result == 0 ; } }
Performs a byte array comparison with a constant time
 @param a A byte array
 @param b Another byte array
 @return True if the byte array have equal contents
 <p/>
 Suitable for strong full length passcode byte comparison
Performs a byte array comparison with a constant time @param a A byte array @param b Another byte array @return True if the byte array have equal contents <p / > Suitable for strong full length passcode byte comparison