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) boolean
isFormatted
(byte[] formattedKey) boolean
isPassphraseProtected
(byte[] formattedKey) boolean
supportsAlgorithm
(String algorithm) toString()
-
Constructor Details
-
OpenSSHPrivateKeyFormat
public OpenSSHPrivateKeyFormat()Creates a new OpenSSHPrivateKeyFormat object.
-
-
Method Details
-
getFormatType
- Specified by:
getFormatType
in interfaceSshPrivateKeyFormat
- Returns:
-
toString
-
decryptKeyblob
- Specified by:
decryptKeyblob
in interfaceSshPrivateKeyFormat
- Parameters:
formattedKey
-passphrase
-- Returns:
- Throws:
InvalidSshKeyException
-
encryptKeyblob
- Specified by:
encryptKeyblob
in interfaceSshPrivateKeyFormat
- Parameters:
keyblob
-passphrase
-- Returns:
- Throws:
InvalidSshKeyException
-
isFormatted
public boolean isFormatted(byte[] formattedKey) - Specified by:
isFormatted
in interfaceSshPrivateKeyFormat
- Parameters:
formattedKey
-- Returns:
-
isPassphraseProtected
public boolean isPassphraseProtected(byte[] formattedKey) - Specified by:
isPassphraseProtected
in interfaceSshPrivateKeyFormat
- Parameters:
formattedKey
-- Returns:
-
supportsAlgorithm
- Specified by:
supportsAlgorithm
in interfaceSshPrivateKeyFormat
- Parameters:
algorithm
-- Returns:
-