public class PEMUtil extends Object
Modifier and Type | Field and Description |
---|---|
(package private) static String |
LINE_SEPARATOR |
Constructor and Description |
---|
PEMUtil() |
Modifier and Type | Method and Description |
---|---|
private static boolean |
beginBase64(String line) |
static List |
decode(byte[] pemBytes) |
static byte[] |
encode(Collection items) |
private static boolean |
endBase64(String line) |
static String |
formatBigInteger(BigInteger bi,
int length) |
static String |
formatRSAPrivateKey(RSAPrivateCrtKey key) |
private static boolean |
startsAndEndsWithDashes(String line) |
static String |
toPem(PublicKey key) |
static final String LINE_SEPARATOR
public PEMUtil()
public static byte[] encode(Collection items) throws IOException
IOException
private static boolean beginBase64(String line)
private static boolean startsAndEndsWithDashes(String line)
public static String formatRSAPrivateKey(RSAPrivateCrtKey key)
public static String formatBigInteger(BigInteger bi, int length)
public static String toPem(PublicKey key) throws IOException
IOException