Class PEMHelper
java.lang.Object
org.jenkinsci.main.modules.instance_identity.pem.PEMHelper
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class PEMHelper
extends Object
Helper class to decode and encode PEM formatted strings using
PEMEncodable
- See Also:
-
PEMEncodable
PEMEncodable.encode()
PEMEncodable.decode(String, char[])
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
PEMHelper
public PEMHelper()
-
-
Method Details
-
decodePEM
Decodes a PEM formatted string toKeyPair
. Wrapper forPEMEncodable.decode(String)
.- Parameters:
pem
-String
with the PEM format- Returns:
- decoded PEM as
KeyPair
- Throws:
IOException
- if a problem exists decoding the PEM- See Also:
-
PEMEncodable.decode(String, char[])
-
encodePEM
Encodes aKeyPair
in a PCKS1 PEM formatted string. Wrapper forPEMEncodable.encode()
.- Parameters:
keys
-KeyPair
to encode- Returns:
KeyPair
as an encoded PEM String- Throws:
IOException
- if a problem exists decoding the PEM- See Also:
-
PEMEncodable.encode()
-