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
- InvalidSshKeyException
public void changePassphrase(java.lang.String oldPassphrase, java.lang.String newPassphrase) throws InvalidSshKeyException
oldPassphrase
- newPassphrase
- InvalidSshKeyException
public static SshPrivateKeyFile parse(byte[] formattedKey) throws InvalidSshKeyException
formattedKey
- InvalidSshKeyException
public static SshPrivateKeyFile parse(java.io.File keyfile) throws InvalidSshKeyException, java.io.IOException
keyfile
- InvalidSshKeyException
java.io.IOException
public boolean isPassphraseProtected()
public static SshPrivateKeyFile create(SshPrivateKey key, java.lang.String passphrase, SshPrivateKeyFormat format) throws InvalidSshKeyException
InvalidSshKeyException
public void setFormat(SshPrivateKeyFormat newFormat, java.lang.String passphrase) throws InvalidSshKeyException
newFormat
- passphrase
- InvalidSshKeyException
public SshPrivateKeyFormat getFormat()
public SshPrivateKey toPrivateKey(java.lang.String passphrase) throws InvalidSshKeyException
passphrase
- InvalidSshKeyException
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.