public class IdentityFile
extends java.lang.Object
implements com.jcraft.jsch.Identity
| 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()
Returns an instance of
KeyPair used in this Identity. |
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.
|
static IdentityFile |
newInstance(java.io.File prvfile,
java.io.File pubfile) |
static IdentityFile |
newInstance(java.lang.String name,
byte[] prvkey,
byte[] pubkey) |
static IdentityFile |
newInstance(java.lang.String prvfile,
java.lang.String pubfile) |
boolean |
setPassphrase(byte[] passphrase)
Decrypts this identity with the specified pass-phrase.
|
public static IdentityFile newInstance(java.io.File prvfile, java.io.File pubfile) throws com.jcraft.jsch.JSchException
com.jcraft.jsch.JSchExceptionpublic static IdentityFile newInstance(java.lang.String prvfile, java.lang.String pubfile) throws com.jcraft.jsch.JSchException
com.jcraft.jsch.JSchExceptionpublic static IdentityFile newInstance(java.lang.String name, byte[] prvkey, byte[] pubkey) throws com.jcraft.jsch.JSchException
com.jcraft.jsch.JSchExceptionpublic boolean setPassphrase(byte[] passphrase)
throws com.jcraft.jsch.JSchException
setPassphrase in interface com.jcraft.jsch.Identitypassphrase - the pass-phrase for this identity.com.jcraft.jsch.JSchExceptionpublic byte[] getPublicKeyBlob()
getPublicKeyBlob in interface com.jcraft.jsch.Identitypublic byte[] getSignature(byte[] data)
getSignature in interface com.jcraft.jsch.Identitydata - data to be signedpublic boolean decrypt()
decrypt in interface com.jcraft.jsch.IdentitysetPassphrase(byte[] passphrase)public java.lang.String getAlgName()
getAlgName in interface com.jcraft.jsch.Identitypublic java.lang.String getName()
IdentityRepository.getName in interface com.jcraft.jsch.Identitypublic boolean isEncrypted()
isEncrypted in interface com.jcraft.jsch.Identitypublic void clear()
clear in interface com.jcraft.jsch.Identity