Class AsymmetricRSAPublicKey
- java.lang.Object
-
- org.bouncycastle.crypto.asymmetric.AsymmetricRSAKey
-
- org.bouncycastle.crypto.asymmetric.AsymmetricRSAPublicKey
-
- All Implemented Interfaces:
AsymmetricKey,AsymmetricPublicKey,Key
public final class AsymmetricRSAPublicKey extends AsymmetricRSAKey implements AsymmetricPublicKey
Class for RSA public keys.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.bouncycastle.crypto.asymmetric.AsymmetricRSAKey
AsymmetricRSAKey.Usage
-
-
Field Summary
-
Fields inherited from class org.bouncycastle.crypto.asymmetric.AsymmetricRSAKey
DEF_ALG_ID, modulus, rsaAlgIdentifier
-
-
Constructor Summary
Constructors Constructor Description AsymmetricRSAPublicKey(Algorithm algorithm, byte[] publicKeyInfoEncoding)AsymmetricRSAPublicKey(Algorithm algorithm, java.math.BigInteger modulus, java.math.BigInteger publicExponent)AsymmetricRSAPublicKey(Algorithm algorithm, SubjectPublicKeyInfo publicKeyInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Return true if o is an equivalent key to this.protected voidfinalize()byte[]getEncoded()Return an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.java.math.BigIntegergetPublicExponent()inthashCode()Return the hashCode for the key.-
Methods inherited from class org.bouncycastle.crypto.asymmetric.AsymmetricRSAKey
canBeUsed, checkApprovedOnlyModeStatus, getAlgorithm, getModulus, zeroize
-
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.bouncycastle.crypto.Key
getAlgorithm
-
-
-
-
Constructor Detail
-
AsymmetricRSAPublicKey
public AsymmetricRSAPublicKey(Algorithm algorithm, java.math.BigInteger modulus, java.math.BigInteger publicExponent)
-
AsymmetricRSAPublicKey
public AsymmetricRSAPublicKey(Algorithm algorithm, byte[] publicKeyInfoEncoding)
-
AsymmetricRSAPublicKey
public AsymmetricRSAPublicKey(Algorithm algorithm, SubjectPublicKeyInfo publicKeyInfo)
-
-
Method Detail
-
getPublicExponent
public java.math.BigInteger getPublicExponent()
-
getEncoded
public byte[] getEncoded()
Description copied from interface:AsymmetricKeyReturn an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.- Specified by:
getEncodedin interfaceAsymmetricKey- Returns:
- an encoding of a PrivateKeyInfo or a SubjectPublicKeyInfo structure.
-
equals
public boolean equals(java.lang.Object o)
Description copied from interface:KeyReturn true if o is an equivalent key to this.
-
hashCode
public int hashCode()
Description copied from interface:KeyReturn the hashCode for the key.
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
-