public interface Identity
The library contains a default implementation which is used by
JSch.addIdentity()
when used
with non-Identity parameters.
Modifier and Type | Method and Description |
---|---|
void |
clear()
Disposes internally allocated data, like byte array for the private key.
|
boolean |
decrypt()
Deprecated.
The decryption should be done automatically in #setPassphase(byte[] passphrase)
|
String |
getAlgName()
Returns the name of the algorithm.
|
String |
getName()
returns the name of this identity.
|
byte[] |
getPublicKeyBlob()
Returns the public key data.
|
byte[] |
getSignature(byte[] data)
Signs some data with our private key and signature algorithm.
|
boolean |
isEncrypted()
Checks whether the private key is encrypted.
|
boolean |
setPassphrase(byte[] passphrase)
Provides a passphrase to decrypt the private key.
|
boolean setPassphrase(byte[] passphrase) throws JSchException
true
if the passphrase was right and
getSignature(byte[])
can now be used, false
if
the passphrase was wrong.JSchException
byte[] getPublicKeyBlob()
byte[] getSignature(byte[] data)
data
- data to be signeddata
, or null
if there
was some problem.boolean decrypt()
setPassphrase(byte[] passphrase)
String getAlgName()
String getName()
IdentityRepository
(and by this allows the application to
remove an identity), is not sent
to the server.boolean isEncrypted()
true
if the key is encrypted, i.e. a call
of setPassphrase(byte[])
is needed, false
if the key
is ready to be used (e.g. getSignature(byte[])
can be called).void clear()
This is an inofficial Javadoc created by PaĆlo Ebermann. Have a look at the official homepage.