org.apache.commons.ssl
Class PEMUtil

java.lang.Object
  extended by 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

Field Summary
(package private) static String LINE_SEPARATOR
           
 
Constructor Summary
PEMUtil()
           
 
Method Summary
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINE_SEPARATOR

static final String LINE_SEPARATOR
Constructor Detail

PEMUtil

public PEMUtil()
Method Detail

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