com.ibm.crypto.fips.provider

Class RSAPublicKey

  1. java.lang.Object
  2. extended bycom.ibm.security.x509.X509Key
  3. extended bycom.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

  1. public final class RSAPublicKey
  2. extends com.ibm.security.x509.X509Key
  3. implements java.security.interfaces.RSAPublicKey, java.io.Serializable
An X.509 public key for the RSA Algorithm.
Version:
1.00, 03/10/99
Author:
Janelle Zhang
See Also:
Serialized Form

Field Summary

Fields inherited from class com.ibm.security.x509.X509Key
algid, encodedKey, key

Constructor Summary

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

Modifier and Type Method and Description
  1. protected
  2. void
finalize()
This function zeroizes the key so that it isn't in memory when GC is done.
  1. java.math.BigInteger
getModulus()
Return the modulus.
  1. java.math.BigInteger
getPublicExponent()
Return the public exponent.
  1. protected
  2. void
parseKeyBits()
  1. java.lang.String
toString()
  1. void
zeroize()
This function zeroizes the key so that it isn't in memory.
Methods inherited from class com.ibm.security.x509.X509Key
decode, decode, encode, encode, equals, getAlgorithm, getAlgorithmId, getEncoded, getFormat, getKey, hashCode, parse, parse, read, readBASE64, setKey, write, writeBASE64
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.security.Key
getAlgorithm, getEncoded, getFormat

Constructor Detail

RSAPublicKey

  1. public RSAPublicKey(java.math.BigInteger m,
  2. java.math.BigInteger p)
  3. throws java.security.InvalidKeyException
Make a RSA public key.
Throws:
java.security.InvalidKeyException

RSAPublicKey

  1. public RSAPublicKey(byte[] encoded)
  2. throws java.security.InvalidKeyException
Make a RSA public key from its DER encoding (X.509).
Throws:
java.security.InvalidKeyException

Method Detail

getModulus

  1. public java.math.BigInteger getModulus( )
Return the modulus.
Specified by:
getModulus in interface java.security.interfaces.RSAKey

getPublicExponent

  1. public java.math.BigInteger getPublicExponent( )
Return the public exponent.
Specified by:
getPublicExponent in interface java.security.interfaces.RSAPublicKey

toString

  1. public java.lang.String toString( )
Overrides:
toString in class com.ibm.security.x509.X509Key

parseKeyBits

  1. protected void parseKeyBits()
  2. throws java.security.InvalidKeyException
Overrides:
parseKeyBits in class com.ibm.security.x509.X509Key
Throws:
java.security.InvalidKeyException

zeroize

  1. public void zeroize()
This function zeroizes the key so that it isn't in memory.

finalize

  1. protected void finalize()
This function zeroizes the key so that it isn't in memory when GC is done.
Overrides:
finalize in class java.lang.Object