Class sun.security.jsafe.RSAPublicKey
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.security.jsafe.RSAPublicKey

java.lang.Object
   |
   +----java.security.Key
           |
           +----sun.security.SunKey
                   |
                   +----sun.security.x509.X509Key
                           |
                           +----sun.security.jsafe.JSafeKey
                                   |
                                   +----sun.security.jsafe.RSAPublicKey

public class RSAPublicKey
extends JSafeKey
implements PublicKey, RSAKey
Holds a public RSA key, for example a public key found in an X.509 certificate. This represents internal key structure in a way that facilitates its active use.

Constructor Index

 o RSAPublicKey()
Default constructor.

Method Index

 o decode(InputStream)
 o encode(OutputStream)
There's a package-visible version of this so we can have package-private key storage.
 o getExponent()
Return the RSA public exponent, as a big-endian byte array without a leading zero.
 o getModulus()
Return the RSA public modulus, as a big-endian byte array without a leading zero.
 o getModulusLen()
Returns the modulus length, in bits.
 o init()
Called to ensure that the BSAFE key object has been created.
 o isSigningOnly()
Returns true iff this key may only be used for digital signature applications.
 o makeKey(byte[], byte[])
 o parseKeyBits()
Parses exponent and modulus parameters from the key bits.
 o toString()

Constructors

 o RSAPublicKey
  public RSAPublicKey()
Default constructor. The key must be initialized, for example by calling decode(), after construction.

Methods

 o getModulus
  public byte[] getModulus()
Return the RSA public modulus, as a big-endian byte array without a leading zero.
 o getExponent
  public byte[] getExponent()
Return the RSA public exponent, as a big-endian byte array without a leading zero.
 o parseKeyBits
  protected void parseKeyBits() throws IOException
Parses exponent and modulus parameters from the key bits.
Overrides:
parseKeyBits in class X509Key
 o getModulusLen
  public int getModulusLen()
Returns the modulus length, in bits. RSA encryption and signing produce blocks of data of this size.
 o isSigningOnly
  public boolean isSigningOnly()
Returns true iff this key may only be used for digital signature applications.
 o init
  public synchronized void init() throws InvalidKeyException
Called to ensure that the BSAFE key object has been created.
Overrides:
init in class JSafeKey
 o makeKey
  public static RSAPublicKey makeKey(byte modulus[],
                                     byte exponent[]) throws IOException
 o toString
  public String toString()
Overrides:
toString in class X509Key
 o encode
  public void encode(OutputStream out) throws InvalidKeyException, IOException
There's a package-visible version of this so we can have package-private key storage.
Overrides:
encode in class JSafeKey
 o decode
  public void decode(InputStream in) throws InvalidKeyException
Overrides:
decode in class X509Key

All Packages  Class Hierarchy  This Package  Previous  Next  Index