public int hashCode() { return this.getModulus().hashCode() ^ this.getPublicExponent().hashCode(); }
public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof RSAPublicKey)) { return false; } RSAPublicKey key = (RSAPublicKey)o; return getModulus().equals(key.getModulus()) && getPublicExponent().equals(key.getPublicExponent()); }
public String toString() { StringBuffer buf = new StringBuffer(); String nl = Strings.lineSeparator(); buf.append("RSA Public Key [").append(RSAUtil.generateKeyFingerprint(this.getModulus())).append("]") .append(",[") .append(RSAUtil.generateExponentFingerprint(this.getPublicExponent())) .append("]") .append(nl); buf.append(" modulus: ").append(this.getModulus().toString(16)).append(nl); buf.append("public exponent: ").append(this.getPublicExponent().toString(16)).append(nl); return buf.toString(); }
public byte[] getEncoded() { return KeyUtil.getEncodedSubjectPublicKeyInfo(algorithmIdentifier, new org.bouncycastle.asn1.pkcs.RSAPublicKey(getModulus(), getPublicExponent())); }