public final class RSAPublicKey extends X509Key implements java.io.Serializable
algid, encodedKey, key
Constructor and Description |
---|
RSAPublicKey() |
RSAPublicKey(BigInt modulus,
BigInt publicExponent)
Make a RSA public key out of a public exponent and modulus
|
RSAPublicKey(byte[] encoded)
Make a RSA public key from its DER encoding (X.509).
|
Modifier and Type | Method and Description |
---|---|
boolean |
bigIntEquals(BigInt x,
BigInt y) |
boolean |
equals(java.lang.Object obj) |
int |
getKeySize()
Get key size as number of bits in modulus
(Always rounded up to a multiple of 8)
|
BigInt |
getModulus()
Get the raw modulus
|
BigInt |
getPublicExponent()
Get the raw public exponent
|
int |
hashCode()
Calculates a hash code value for the object.
|
protected void |
parseKeyBits()
Parse the key bits.
|
java.lang.String |
toString() |
decode, decode, encode, encode, getAlgorithm, getAlgorithmId, getEncoded, getFormat, getKey, parse, parsePublicKey
public RSAPublicKey()
public RSAPublicKey(BigInt modulus, BigInt publicExponent) throws java.security.InvalidKeyException
java.security.InvalidKeyException
public RSAPublicKey(byte[] encoded) throws java.security.InvalidKeyException
java.security.InvalidKeyException
public int getKeySize()
public BigInt getPublicExponent()
public BigInt getModulus()
protected void parseKeyBits() throws java.security.InvalidKeyException
X509Key
key
bits; Diffie-Hellman and
DSS/DSA keys encapsulate a single unsigned integer.
This function is called when creating X.509 SubjectPublicKeyInfo values using the X509Key member functions, such
as parse
and decode
.
parseKeyBits
in class X509Key
java.security.InvalidKeyException
- on invalid key encodings.public int hashCode()
X509Key