public enum PEM extends java.lang.Enum<PEM>
Some background information:
openssl pkcs8 -topk8 -in pk-APKAJM22QV32R3I2XVIQ.pem -inform pem -out pk-APKAJM22QV32R3I2XVIQ_pk8.pem -outform pem -nocrypt
| Modifier and Type | Method and Description |
|---|---|
static java.security.PrivateKey |
readPrivateKey(java.io.InputStream is)
Returns the first private key that is found from the input stream of a
PEM file.
|
static java.security.PublicKey |
readPublicKey(java.io.InputStream is)
Returns the first public key that is found from the input stream of a PEM
file.
|
static PEM |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static PEM[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static PEM[] values()
for (PEM c : PEM.values()) System.out.println(c);
public static PEM 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 readPrivateKey(java.io.InputStream is)
throws java.security.spec.InvalidKeySpecException,
java.io.IOException
java.security.spec.InvalidKeySpecException - if failed to convert the DER bytes into a private key.java.lang.IllegalArgumentException - if no private key is found.java.io.IOExceptionpublic static java.security.PublicKey readPublicKey(java.io.InputStream is)
throws java.security.spec.InvalidKeySpecException,
java.io.IOException
java.security.spec.InvalidKeySpecException - if failed to convert the DER bytes into a public key.java.lang.IllegalArgumentException - if no public key is found.java.io.IOExceptionCopyright © 2014-2015 Tomitribe Corporation. All Rights Reserved.