@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public class PEMHelper extends Object
| Constructor and Description |
|---|
PEMHelper() |
| Modifier and Type | Method and Description |
|---|---|
static KeyPair |
decodePEM(String pem)
Decodes a PEM formated string to
KeyPair. |
static String |
encodePEM(KeyPair keys)
Encodes a
KeyPair in a PCKS8 PEM formated string. |
@Nonnull public static KeyPair decodePEM(@Nonnull String pem) throws IOException
KeyPair. Only PCKS1 and PCKS8 formats are supportedpem - String with the PEM formatKeyPairIOException - if a problem exists decoding the PEM@Nonnull public static String encodePEM(@Nonnull KeyPair keys) throws IOException
KeyPair in a PCKS8 PEM formated string.keys - KeyPair to encodeKeyPair as an encoded PEM StringIOException - if a problem exists decoding the PEMCopyright © 2016. All rights reserved.