Class ConstantTimeUtils

    • Method Detail

      • areEqual

        public static boolean areEqual​(byte[] a,
                                       byte[] b)
        Checks the specified arrays for equality in constant time. Intended to mitigate timing attacks.
        Parameters:
        a - The first array. Must not be null.
        b - The second array. Must not be null.
        Returns:
        true if the two arrays are equal, else false.