public class SshPrivateKeyFile
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
SshPrivateKeyFile(byte[] keyblob,
SshPrivateKeyFormat format)
Creates a new SshPrivateKeyFile object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
changePassphrase(java.lang.String oldPassphrase,
java.lang.String newPassphrase) |
static SshPrivateKeyFile |
create(SshPrivateKey key,
java.lang.String passphrase,
SshPrivateKeyFormat format) |
byte[] |
getBytes() |
SshPrivateKeyFormat |
getFormat() |
byte[] |
getKeyBlob(java.lang.String passphrase) |
boolean |
isPassphraseProtected() |
static SshPrivateKeyFile |
parse(byte[] formattedKey) |
static SshPrivateKeyFile |
parse(java.io.File keyfile) |
void |
setFormat(SshPrivateKeyFormat newFormat,
java.lang.String passphrase) |
SshPrivateKey |
toPrivateKey(java.lang.String passphrase) |
java.lang.String |
toString() |
protected SshPrivateKeyFile(byte[] keyblob,
SshPrivateKeyFormat format)
keyblob - format - public byte[] getBytes()
public byte[] getKeyBlob(java.lang.String passphrase)
throws InvalidSshKeyException
passphrase - InvalidSshKeyExceptionpublic void changePassphrase(java.lang.String oldPassphrase,
java.lang.String newPassphrase)
throws InvalidSshKeyException
oldPassphrase - newPassphrase - InvalidSshKeyExceptionpublic static SshPrivateKeyFile parse(byte[] formattedKey) throws InvalidSshKeyException
formattedKey - InvalidSshKeyExceptionpublic static SshPrivateKeyFile parse(java.io.File keyfile) throws InvalidSshKeyException, java.io.IOException
keyfile - InvalidSshKeyExceptionjava.io.IOExceptionpublic boolean isPassphraseProtected()
public static SshPrivateKeyFile create(SshPrivateKey key, java.lang.String passphrase, SshPrivateKeyFormat format) throws InvalidSshKeyException
InvalidSshKeyExceptionpublic void setFormat(SshPrivateKeyFormat newFormat, java.lang.String passphrase) throws InvalidSshKeyException
newFormat - passphrase - InvalidSshKeyExceptionpublic SshPrivateKeyFormat getFormat()
public SshPrivateKey toPrivateKey(java.lang.String passphrase) throws InvalidSshKeyException
passphrase - InvalidSshKeyExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.