Package com.sshtools.j2ssh.openssh
Class PEM
- java.lang.Object
-
- com.sshtools.j2ssh.openssh.PEM
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDSA_PRIVATE_KEYprotected static char[]HEX_CHARSprotected static intMAX_LINE_LENGTHprotected static java.lang.StringPEM_BEGINprotected static java.lang.StringPEM_BOUNDARYprotected static java.lang.StringPEM_ENDstatic java.lang.StringRSA_PRIVATE_KEY
-
Constructor Summary
Constructors Constructor Description PEM()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static javax.crypto.SecretKeygetKeyFromPassphrase(java.lang.String passphrase, byte[] iv, int keySize)
-
-
-
Field Detail
-
DSA_PRIVATE_KEY
public static final java.lang.String DSA_PRIVATE_KEY
- See Also:
- Constant Field Values
-
RSA_PRIVATE_KEY
public static final java.lang.String RSA_PRIVATE_KEY
- See Also:
- Constant Field Values
-
PEM_BOUNDARY
protected static final java.lang.String PEM_BOUNDARY
- See Also:
- Constant Field Values
-
PEM_BEGIN
protected static final java.lang.String PEM_BEGIN
- See Also:
- Constant Field Values
-
PEM_END
protected static final java.lang.String PEM_END
- See Also:
- Constant Field Values
-
MAX_LINE_LENGTH
protected static final int MAX_LINE_LENGTH
- See Also:
- Constant Field Values
-
HEX_CHARS
protected static final char[] HEX_CHARS
-
-
Method Detail
-
getKeyFromPassphrase
protected static javax.crypto.SecretKey getKeyFromPassphrase(java.lang.String passphrase, byte[] iv, int keySize) throws java.security.NoSuchAlgorithmException, java.security.spec.InvalidKeySpecException- Parameters:
passphrase-iv-keySize-- Returns:
- Throws:
java.security.NoSuchAlgorithmExceptionjava.security.spec.InvalidKeySpecExceptionjava.lang.Error
-
-