public class PEMDecoder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static int |
PEM_DSA_PRIVATE_KEY |
private static int |
PEM_RSA_PRIVATE_KEY |
Constructor and Description |
---|
PEMDecoder() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
decode(char[] pem,
java.lang.String password) |
private static void |
decryptPEM(PEMStructure ps,
byte[] pw) |
private static byte[] |
generateKeyFromPasswordSaltWithMD5(byte[] password,
byte[] salt,
int keyLen) |
private static byte[] |
hexToByteArray(java.lang.String hex) |
private static int |
hexToInt(char c) |
static boolean |
isPEMEncrypted(PEMStructure ps) |
private static PEMStructure |
parsePEM(char[] pem) |
private static byte[] |
removePadding(byte[] buff,
int blockSize) |
private static final int PEM_RSA_PRIVATE_KEY
private static final int PEM_DSA_PRIVATE_KEY
private static final int hexToInt(char c)
private static byte[] hexToByteArray(java.lang.String hex)
private static byte[] generateKeyFromPasswordSaltWithMD5(byte[] password, byte[] salt, int keyLen) throws java.io.IOException
java.io.IOException
private static byte[] removePadding(byte[] buff, int blockSize) throws java.io.IOException
java.io.IOException
private static final PEMStructure parsePEM(char[] pem) throws java.io.IOException
java.io.IOException
private static final void decryptPEM(PEMStructure ps, byte[] pw) throws java.io.IOException
java.io.IOException
public static final boolean isPEMEncrypted(PEMStructure ps) throws java.io.IOException
java.io.IOException
public static java.lang.Object decode(char[] pem, java.lang.String password) throws java.io.IOException
java.io.IOException