public class OpenSSHPrivateKeyFormat extends java.lang.Object implements SshPrivateKeyFormat
Constructor and Description |
---|
OpenSSHPrivateKeyFormat()
Creates a new OpenSSHPrivateKeyFormat object.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
decryptKeyblob(byte[] formattedKey,
java.lang.String passphrase) |
byte[] |
encryptKeyblob(byte[] keyblob,
java.lang.String passphrase) |
java.lang.String |
getFormatType() |
boolean |
isFormatted(byte[] formattedKey) |
boolean |
isPassphraseProtected(byte[] formattedKey) |
boolean |
supportsAlgorithm(java.lang.String algorithm) |
java.lang.String |
toString() |
public OpenSSHPrivateKeyFormat()
public java.lang.String getFormatType()
getFormatType
in interface SshPrivateKeyFormat
public java.lang.String toString()
toString
in class java.lang.Object
public byte[] decryptKeyblob(byte[] formattedKey, java.lang.String passphrase) throws InvalidSshKeyException
decryptKeyblob
in interface SshPrivateKeyFormat
formattedKey
- passphrase
- InvalidSshKeyException
public byte[] encryptKeyblob(byte[] keyblob, java.lang.String passphrase) throws InvalidSshKeyException
encryptKeyblob
in interface SshPrivateKeyFormat
keyblob
- passphrase
- InvalidSshKeyException
public boolean isFormatted(byte[] formattedKey)
isFormatted
in interface SshPrivateKeyFormat
formattedKey
- public boolean isPassphraseProtected(byte[] formattedKey)
isPassphraseProtected
in interface SshPrivateKeyFormat
formattedKey
- public boolean supportsAlgorithm(java.lang.String algorithm)
supportsAlgorithm
in interface SshPrivateKeyFormat
algorithm
- Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.