static boolean secureEquals(@Nullable String a, @Nullable String b) {
        if (a == null) {
            return b == null;
        }
        if (b == null) {
            return false;
        }

        final int aLength = a.length();
        final int bLength = b.length();
        final int length = Math.min(aLength, bLength);
        int result = 0;
        for (int i = 0; i < length; i++) {
            result |= a.charAt(i) ^ b.charAt(i);
        }
        return result == 0 && aLength == bLength;
    }
Compares two specified strings in the secure way.
core/src/main/java/com/linecorp/armeria/common/auth/AuthUtil.java