Package com.sshtools.j2ssh.openssh
Class OpenSSHPrivateKeyFormat
- java.lang.Object
-
- com.sshtools.j2ssh.openssh.OpenSSHPrivateKeyFormat
-
- All Implemented Interfaces:
SshPrivateKeyFormat
public class OpenSSHPrivateKeyFormat extends java.lang.Object implements SshPrivateKeyFormat
- Version:
- $Revision: 1.12 $
- Author:
- $author$
-
-
Constructor Summary
Constructors Constructor Description OpenSSHPrivateKeyFormat()Creates a new OpenSSHPrivateKeyFormat object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]decryptKeyblob(byte[] formattedKey, java.lang.String passphrase)byte[]encryptKeyblob(byte[] keyblob, java.lang.String passphrase)java.lang.StringgetFormatType()booleanisFormatted(byte[] formattedKey)booleanisPassphraseProtected(byte[] formattedKey)booleansupportsAlgorithm(java.lang.String algorithm)java.lang.StringtoString()
-
-
-
Method Detail
-
getFormatType
public java.lang.String getFormatType()
- Specified by:
getFormatTypein interfaceSshPrivateKeyFormat- Returns:
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- Returns:
-
decryptKeyblob
public byte[] decryptKeyblob(byte[] formattedKey, java.lang.String passphrase) throws InvalidSshKeyException- Specified by:
decryptKeyblobin interfaceSshPrivateKeyFormat- Parameters:
formattedKey-passphrase-- Returns:
- Throws:
InvalidSshKeyException
-
encryptKeyblob
public byte[] encryptKeyblob(byte[] keyblob, java.lang.String passphrase) throws InvalidSshKeyException- 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
public boolean supportsAlgorithm(java.lang.String algorithm)
- Specified by:
supportsAlgorithmin interfaceSshPrivateKeyFormat- Parameters:
algorithm-- Returns:
-
-