public final class PemUtils extends Object
Modifier and Type | Method and Description |
---|---|
static X509Certificate |
decodeCertificate(String cert)
Decode a X509 Certificate from a PEM string
|
static PrivateKey |
decodePrivateKey(String pem)
Decode a Private Key from a PEM string
|
static PublicKey |
decodePublicKey(String pem)
Decode a Public Key from a PEM string
|
static String |
encodeCertificate(Certificate certificate)
Encode a X509 Certificate to a PEM string
|
static String |
encodeKey(Key key)
Encode a Key to a PEM string
|
static String |
removeBeginEnd(String pem) |
public static X509Certificate decodeCertificate(String cert)
cert
- Exception
public static PublicKey decodePublicKey(String pem)
pem
- Exception
public static PrivateKey decodePrivateKey(String pem)
pem
- Exception
public static String encodeKey(Key key)
key
- Exception
public static String encodeCertificate(Certificate certificate)
certificate
- Copyright © 2018 JBoss by Red Hat. All rights reserved.