ch.ethz.ssh2.crypto
Class PEMDecoder
java.lang.Object
ch.ethz.ssh2.crypto.PEMDecoder
public class PEMDecoder
- extends java.lang.Object
PEM Support.
- Version:
- 2.50, 03/15/10
- Author:
- Christian Plattner
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PEM_RSA_PRIVATE_KEY
private static final int PEM_RSA_PRIVATE_KEY
- See Also:
- Constant Field Values
PEM_DSA_PRIVATE_KEY
private static final int PEM_DSA_PRIVATE_KEY
- See Also:
- Constant Field Values
PEMDecoder
public PEMDecoder()
hexToInt
private static final int hexToInt(char c)
hexToByteArray
private static byte[] hexToByteArray(java.lang.String hex)
generateKeyFromPasswordSaltWithMD5
private static byte[] generateKeyFromPasswordSaltWithMD5(byte[] password,
byte[] salt,
int keyLen)
throws java.io.IOException
- Throws:
java.io.IOException
removePadding
private static byte[] removePadding(byte[] buff,
int blockSize)
throws java.io.IOException
- Throws:
java.io.IOException
parsePEM
private static final PEMStructure parsePEM(char[] pem)
throws java.io.IOException
- Throws:
java.io.IOException
decryptPEM
private static final void decryptPEM(PEMStructure ps,
byte[] pw)
throws java.io.IOException
- Throws:
java.io.IOException
isPEMEncrypted
public static final boolean isPEMEncrypted(PEMStructure ps)
throws java.io.IOException
- Throws:
java.io.IOException
decode
public static java.lang.Object decode(char[] pem,
java.lang.String password)
throws java.io.IOException
- Throws:
java.io.IOException