@Override
    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }

        if (o instanceof OpenSSLRSAPrivateKey) {
            OpenSSLRSAPrivateKey other = (OpenSSLRSAPrivateKey) o;
            return key.equals(other.getOpenSSLKey());
        }

        if (o instanceof RSAPrivateKey) {
            ensureReadParams();
            RSAPrivateKey other = (RSAPrivateKey) o;

            return modulus.equals(other.getModulus())
                    && privateExponent.equals(other.getPrivateExponent());
        }

        return false;
    }
Wraps the provided private key for use in the TLS/SSL stack only. Sign/decrypt operations
using the key will be delegated to the {@code Signature}/{@code Cipher} implementation of the
provider which accepts the key.
common/src/main/java/org/conscrypt/OpenSSLRSAPrivateKey.java