@Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        X509PublicKey other = (X509PublicKey) obj;
        if (algorithm == null) {
            if (other.algorithm != null)
                return false;
        } else if (!algorithm.equals(other.algorithm))
            return false;
        if (!Arrays.equals(encoded, other.encoded))
            return false;
        return true;
    }
A simple but useless key class that holds X.509 public key information when
the appropriate KeyFactory for the key algorithm is not available.
common/src/main/java/org/conscrypt/X509PublicKey.java