Package com.sshtools.j2ssh.openssh
Class OpenSSHPrivateKeyFormat
java.lang.Object
com.sshtools.j2ssh.openssh.OpenSSHPrivateKeyFormat
- All Implemented Interfaces:
SshPrivateKeyFormat
- Version:
- $Revision: 1.12 $
- Author:
- $author$
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]decryptKeyblob(byte[] formattedKey, String passphrase) byte[]encryptKeyblob(byte[] keyblob, String passphrase) booleanisFormatted(byte[] formattedKey) booleanisPassphraseProtected(byte[] formattedKey) booleansupportsAlgorithm(String algorithm) toString()
-
Constructor Details
-
OpenSSHPrivateKeyFormat
public OpenSSHPrivateKeyFormat()Creates a new OpenSSHPrivateKeyFormat object.
-
-
Method Details
-
getFormatType
- Specified by:
getFormatTypein interfaceSshPrivateKeyFormat- Returns:
-
toString
-
decryptKeyblob
- Specified by:
decryptKeyblobin interfaceSshPrivateKeyFormat- Parameters:
formattedKey-passphrase-- Returns:
- Throws:
InvalidSshKeyException
-
encryptKeyblob
- Specified by:
encryptKeyblobin interfaceSshPrivateKeyFormat- Parameters:
keyblob-passphrase-- Returns:
- Throws:
InvalidSshKeyException
-
isFormatted
public boolean isFormatted(byte[] formattedKey) - Specified by:
isFormattedin interfaceSshPrivateKeyFormat- Parameters:
formattedKey-- Returns:
-
isPassphraseProtected
public boolean isPassphraseProtected(byte[] formattedKey) - Specified by:
isPassphraseProtectedin interfaceSshPrivateKeyFormat- Parameters:
formattedKey-- Returns:
-
supportsAlgorithm
- Specified by:
supportsAlgorithmin interfaceSshPrivateKeyFormat- Parameters:
algorithm-- Returns:
-