| Modifier and Type | Method and Description |
|---|---|
static java.security.PrivateKey |
privateKeyFromPKCS1(byte[] pkcs1)
Returns a private key constructed from the given DER bytes in PKCS#1 format.
|
static java.security.PrivateKey |
privateKeyFromPKCS8(byte[] pkcs8)
Returns a private key constructed from the given DER bytes in PKCS#8 format.
|
static java.security.PublicKey |
publicKeyFrom(byte[] derBytes)
Returns a public key constructed from the given DER bytes.
|
static RSA |
valueOf(java.lang.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(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static java.security.PrivateKey privateKeyFromPKCS8(byte[] pkcs8)
throws java.security.spec.InvalidKeySpecException
java.security.spec.InvalidKeySpecExceptionpublic static java.security.PrivateKey privateKeyFromPKCS1(byte[] pkcs1)
throws java.security.spec.InvalidKeySpecException
java.security.spec.InvalidKeySpecExceptionpublic static java.security.PublicKey publicKeyFrom(byte[] derBytes)
throws java.security.spec.InvalidKeySpecException
java.security.spec.InvalidKeySpecExceptionCopyright © 2014-2015 Tomitribe Corporation. All Rights Reserved.