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.
-
RSAPublicKey()
- Default constructor.
-
decode(InputStream)
-
-
encode(OutputStream)
- There's a package-visible version of this so we can have
package-private key storage.
-
getExponent()
- Return the RSA public exponent, as a big-endian byte array
without a leading zero.
-
getModulus()
- Return the RSA public modulus, as a big-endian byte array
without a leading zero.
-
getModulusLen()
- Returns the modulus length, in bits.
-
init()
- Called to ensure that the BSAFE key object has been created.
-
isSigningOnly()
- Returns true iff this key may only be used for digital signature
applications.
-
makeKey(byte[], byte[])
-
-
parseKeyBits()
- Parses exponent and modulus parameters from the key bits.
-
toString()
-
RSAPublicKey
public RSAPublicKey()
- Default constructor. The key must be initialized, for
example by calling decode(), after construction.
getModulus
public byte[] getModulus()
- Return the RSA public modulus, as a big-endian byte array
without a leading zero.
getExponent
public byte[] getExponent()
- Return the RSA public exponent, as a big-endian byte array
without a leading zero.
parseKeyBits
protected void parseKeyBits() throws IOException
- Parses exponent and modulus parameters from the key bits.
- Overrides:
- parseKeyBits in class X509Key
getModulusLen
public int getModulusLen()
- Returns the modulus length, in bits. RSA encryption and signing
produce blocks of data of this size.
isSigningOnly
public boolean isSigningOnly()
- Returns true iff this key may only be used for digital signature
applications.
init
public synchronized void init() throws InvalidKeyException
- Called to ensure that the BSAFE key object has been created.
- Overrides:
- init in class JSafeKey
makeKey
public static RSAPublicKey makeKey(byte modulus[],
byte exponent[]) throws IOException
toString
public String toString()
- Overrides:
- toString in class X509Key
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
decode
public void decode(InputStream in) throws InvalidKeyException
- Overrides:
- decode in class X509Key
All Packages Class Hierarchy This Package Previous Next Index