public static boolean arraysEqual(byte[] lhs, byte[] rhs) {
        return Arrays.constantTimeAreEqual(lhs, rhs);
    }
@Test
    void arrays_equal_checks_length_and_array_contents() {
        assertTrue(SideChannelSafe.arraysEqual(new byte[0], new byte[0]));
        assertFalse(SideChannelSafe.arraysEqual(new byte[] { 0 }, new byte[0]));
        assertFalse(SideChannelSafe.arraysEqual(new byte[0], new byte[]{ 0 }));
        assertTrue(SideChannelSafe.arraysEqual(new byte[] { 0, 0, 0 }, new byte[] { 0, 0, 0 }));
        assertTrue(SideChannelSafe.arraysEqual(new byte[] { 0x7, 0xe }, new byte[] { 0x7, 0xe }));
        assertFalse(SideChannelSafe.arraysEqual(new byte[] { 0xe, 0x7 }, new byte[] { 0x7, 0xe }));
        assertFalse(SideChannelSafe.arraysEqual(new byte[] { -1, 127 }, new byte[] { 127, -1 }));
        assertFalse(SideChannelSafe.arraysEqual(new byte[] { -1, -1, 1 }, new byte[] { -1, -1, 2 }));
        assertFalse(SideChannelSafe.arraysEqual(new byte[] { 0, -1, 1 }, new byte[] { 0, -1, 3 }));
    }