Package com.sshtools.common.publickey
Class PEMReader
java.lang.Object
com.sshtools.common.publickey.PEMReader
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]decryptPayload(String passphrase) protected static byte[]getKeyFromPassphrase(String passphrase, byte[] iv, int keySize) byte[]getType()
-
Field Details
-
DSA_PRIVATE_KEY
- See Also:
-
RSA_PRIVATE_KEY
- See Also:
-
EC_PRIVATE_KEY
- See Also:
-
OPENSSH_PRIVATE_KEY
- See Also:
-
PEM_BOUNDARY
- See Also:
-
PEM_BEGIN
- See Also:
-
PEM_END
- See Also:
-
MAX_LINE_LENGTH
protected static final int MAX_LINE_LENGTH- See Also:
-
HEX_CHARS
protected static final char[] HEX_CHARS
-
-
Constructor Details
-
PEMReader
Creates a new PEMReader object.- Parameters:
r-- Throws:
IOException
-
-
Method Details
-
getHeader
- Returns:
- Hashtable
-
getPayload
public byte[] getPayload()- Returns:
- byte[]
-
getType
- Returns:
- String
-
decryptPayload
- Parameters:
passphrase-- Returns:
- byte[]
- Throws:
IOException
-
getKeyFromPassphrase
protected static byte[] getKeyFromPassphrase(String passphrase, byte[] iv, int keySize) throws IOException - Parameters:
passphrase-iv-keySize-- Returns:
- byte[]
- Throws:
IOException
-