| 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
JSchExceptionstatic IdentityFile newInstance(java.lang.String prvfile, java.lang.String pubfile, JSch jsch) throws JSchException
JSchExceptionstatic IdentityFile newInstance(java.lang.String name, byte[] prvkey, byte[] pubkey, JSch jsch) throws JSchException
JSchExceptionpublic boolean setPassphrase(byte[] passphrase)
throws JSchException
setPassphrase in interface Identitypassphrase - the pass-phrase for this identity.JSchExceptionpublic byte[] getPublicKeyBlob()
getPublicKeyBlob in interface Identitypublic byte[] getSignature(byte[] data)
getSignature in interface Identitydata - data to be signedpublic boolean decrypt()
decrypt in interface IdentitysetPassphrase(byte[] passphrase)public java.lang.String getAlgName()
getAlgName in interface Identitypublic java.lang.String getName()
IdentityRepository.public boolean isEncrypted()
isEncrypted in interface Identitypublic void clear()