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:
-
PEMEncodablePEMEncodable.encode()PEMEncodable.decode(String, char[])
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PEMHelper
public PEMHelper()
-
-
Method Details
-
decodePEM
Decodes a PEM formatted string toKeyPair. Wrapper forPEMEncodable.decode(String).- Parameters:
pem-Stringwith 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 aKeyPairin a PCKS1 PEM formatted string. Wrapper forPEMEncodable.encode().- Parameters:
keys-KeyPairto encode- Returns:
KeyPairas an encoded PEM String- Throws:
IOException- if a problem exists decoding the PEM- See Also:
-
PEMEncodable.encode()
-