public enum RSA extends Enum<RSA>
Modifier and Type | Method and Description |
---|---|
static PrivateKey |
privateKeyFromPKCS1(byte[] pkcs1)
Returns a private key constructed from the given DER bytes in PKCS#1 format.
|
static PrivateKey |
privateKeyFromPKCS8(byte[] pkcs8)
Returns a private key constructed from the given DER bytes in PKCS#8 format.
|
static PublicKey |
publicKeyFrom(byte[] derBytes)
Returns a public key constructed from the given DER bytes.
|
static RSA |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RSA[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static RSA[] values()
for (RSA c : RSA.values()) System.out.println(c);
public static RSA valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static PrivateKey privateKeyFromPKCS8(byte[] pkcs8) throws InvalidKeySpecException
InvalidKeySpecException
public static PrivateKey privateKeyFromPKCS1(byte[] pkcs1) throws InvalidKeySpecException
InvalidKeySpecException
public static PublicKey publicKeyFrom(byte[] derBytes) throws InvalidKeySpecException
InvalidKeySpecException