org.apache.commons.ssl
Class PEMUtil
java.lang.Object
org.apache.commons.ssl.PEMUtil
public class PEMUtil
- extends Object
- Since:
- 13-Aug-2006
- Author:
- Credit Union Central of British Columbia, www.cucbc.com, juliusdavies@cucbc.com
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LINE_SEPARATOR
static final String LINE_SEPARATOR
PEMUtil
public PEMUtil()
encode
public static byte[] encode(Collection items)
throws IOException
- Throws:
IOException
decode
public static List decode(byte[] pemBytes)
beginBase64
private static boolean beginBase64(String line)
endBase64
private static boolean endBase64(String line)
startsAndEndsWithDashes
private static boolean startsAndEndsWithDashes(String line)
formatRSAPrivateKey
public static String formatRSAPrivateKey(RSAPrivateCrtKey key)
formatBigInteger
public static String formatBigInteger(BigInteger bi,
int length)
toPem
public static String toPem(PublicKey key)
throws IOException
- Throws:
IOException