Modifier and Type | Field and Description |
---|---|
private java.lang.String |
identity |
private JSch |
jsch |
private KeyPair |
kpair |
Modifier | Constructor and Description |
---|---|
private |
IdentityFile(JSch jsch,
java.lang.String name,
KeyPair kpair) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Disposes internally allocated data, like byte array for the private key.
|
boolean |
decrypt()
Deprecated.
This method should not be invoked.
|
java.lang.String |
getAlgName()
Returns the name of the key algorithm.
|
KeyPair |
getKeyPair()
|
java.lang.String |
getName()
Returns the name of this identity.
|
byte[] |
getPublicKeyBlob()
Returns the public-key blob.
|
byte[] |
getSignature(byte[] data)
Signs on data with this identity, and returns the result.
|
boolean |
isEncrypted()
Returns true if this identity is cyphered.
|
(package private) static IdentityFile |
newInstance(java.lang.String name,
byte[] prvkey,
byte[] pubkey,
JSch jsch) |
(package private) static IdentityFile |
newInstance(java.lang.String prvfile,
java.lang.String pubfile,
JSch jsch) |
boolean |
setPassphrase(byte[] passphrase)
Decrypts this identity with the specified pass-phrase.
|
private JSch jsch
private KeyPair kpair
private java.lang.String identity
private IdentityFile(JSch jsch, java.lang.String name, KeyPair kpair) throws JSchException
JSchException
static IdentityFile newInstance(java.lang.String prvfile, java.lang.String pubfile, JSch jsch) throws JSchException
JSchException
static IdentityFile newInstance(java.lang.String name, byte[] prvkey, byte[] pubkey, JSch jsch) throws JSchException
JSchException
public boolean setPassphrase(byte[] passphrase) throws JSchException
setPassphrase
in interface Identity
passphrase
- the pass-phrase for this identity.JSchException
public byte[] getPublicKeyBlob()
getPublicKeyBlob
in interface Identity
public byte[] getSignature(byte[] data)
getSignature
in interface Identity
data
- data to be signedpublic boolean decrypt()
decrypt
in interface Identity
setPassphrase(byte[] passphrase)
public java.lang.String getAlgName()
getAlgName
in interface Identity
public java.lang.String getName()
IdentityRepository
.public boolean isEncrypted()
isEncrypted
in interface Identity
public void clear()