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