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