com.ibm.crypto.fips.provider
Class RSAPublicKey
- java.lang.Object
-
- com.ibm.security.x509.X509Key
-
- com.ibm.crypto.fips.provider.RSAPublicKey
-
- All Implemented Interfaces:
- java.io.Serializable, java.security.interfaces.RSAKey, java.security.interfaces.RSAPublicKey, java.security.Key, java.security.PublicKey
public final class RSAPublicKey extends com.ibm.security.x509.X509Key implements java.security.interfaces.RSAPublicKey, java.io.SerializableAn X.509 public key for the RSA Algorithm.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description RSAPublicKey(java.math.BigInteger m, java.math.BigInteger p)Make a RSA public key.RSAPublicKey(byte[] encoded)Make a RSA public key from its DER encoding (X.509).
-
Method Summary
Methods Modifier and Type Method and Description protected voidfinalize()This function zeroizes the key so that it isn't in memory when GC is done.java.math.BigIntegergetModulus()Return the modulus.java.math.BigIntegergetPublicExponent()Return the public exponent.protected voidparseKeyBits()java.lang.StringtoString()voidzeroize()This function zeroizes the key so that it isn't in memory.
-
-
-
Constructor Detail
-
RSAPublicKey
public RSAPublicKey(java.math.BigInteger m, java.math.BigInteger p) throws java.security.InvalidKeyExceptionMake a RSA public key.- Throws:
java.security.InvalidKeyException
-
RSAPublicKey
public RSAPublicKey(byte[] encoded) throws java.security.InvalidKeyExceptionMake a RSA public key from its DER encoding (X.509).- Throws:
java.security.InvalidKeyException
-
-
Method Detail
-
getModulus
public java.math.BigInteger getModulus()
Return the modulus.- Specified by:
getModulusin interfacejava.security.interfaces.RSAKey
-
getPublicExponent
public java.math.BigInteger getPublicExponent()
Return the public exponent.- Specified by:
getPublicExponentin interfacejava.security.interfaces.RSAPublicKey
-
toString
public java.lang.String toString()
- Overrides:
toStringin classcom.ibm.security.x509.X509Key
-
parseKeyBits
protected void parseKeyBits() throws java.security.InvalidKeyException- Overrides:
parseKeyBitsin classcom.ibm.security.x509.X509Key- Throws:
java.security.InvalidKeyException
-
zeroize
public void zeroize()
This function zeroizes the key so that it isn't in memory.
-
finalize
protected void finalize()
This function zeroizes the key so that it isn't in memory when GC is done.- Overrides:
finalizein classjava.lang.Object
-
-