com.jcraft.jsch.IdentityFile Class Reference

The default (internal) Identity implementation, using explicitly given public and private RSA or DSA keys. More...

Inheritance diagram for com.jcraft.jsch.IdentityFile:
Inheritance graph
[legend]
Collaboration diagram for com.jcraft.jsch.IdentityFile:
Collaboration graph
[legend]

List of all members.

Public Member Functions

String getAlgName ()
 Returns the name of the algorithm.
boolean setPassphrase (byte[] _passphrase) throws JSchException
byte[] getPublicKeyBlob ()
 Returns the public key data.
byte[] getSignature (byte[] data)
boolean decrypt ()
boolean isEncrypted ()
String getName ()
 returns the name of this identity.
boolean equals (Object o)
void clear ()
void finalize ()

Package Functions

byte[] getPublicKeyBlob_rsa ()
byte[] getPublicKeyBlob_dss ()
byte[] getSignature_rsa (byte[] data)
byte[] getSignature_dss (byte[] data)
boolean decrypt_rsa ()
boolean decrypt_dss ()

Static Package Functions

static IdentityFile newInstance (String prvfile, String pubfile, JSch jsch) throws JSchException
 Creates a new IdentityFile instance from the public and private key file names.
static IdentityFile newInstance (String name, byte[] prvkey, byte[] pubkey, JSch jsch) throws JSchException
 Creates a new IdentityFile instance from the public and private key data.

Package Attributes

String identity
byte[] key
byte[] iv

Private Member Functions

 IdentityFile (String name, byte[] prvkey, byte[] pubkey, JSch jsch) throws JSchException
byte a2b (byte c)

Private Attributes

JSch jsch
HASH hash
byte[] encoded_data
Cipher cipher
byte[] P_array
byte[] Q_array
byte[] G_array
byte[] pub_array
byte[] prv_array
byte[] n_array
byte[] e_array
byte[] d_array
String algname = "ssh-rsa"
int type = ERROR
int keytype = OPENSSH
byte[] publickeyblob = null
boolean encrypted = true

Static Private Attributes

static final int ERROR = 0
static final int RSA = 1
static final int DSS = 2
static final int UNKNOWN = 3
static final int OPENSSH = 0
static final int FSECURE = 1
static final int PUTTY = 2

Detailed Description

The default (internal) Identity implementation, using explicitly given public and private RSA or DSA keys.

Definition at line 39 of file IdentityFile.java.


Constructor & Destructor Documentation

com.jcraft.jsch.IdentityFile.IdentityFile ( String  name,
byte[]  prvkey,
byte[]  pubkey,
JSch  jsch 
) throws JSchException [private]

Member Function Documentation

byte com.jcraft.jsch.IdentityFile.a2b ( byte  c  )  [private]

Definition at line 912 of file IdentityFile.java.

Referenced by com.jcraft.jsch.IdentityFile.IdentityFile().

void com.jcraft.jsch.IdentityFile.clear (  ) 
boolean com.jcraft.jsch.IdentityFile.decrypt (  ) 
boolean com.jcraft.jsch.IdentityFile.decrypt_dss (  )  [package]
boolean com.jcraft.jsch.IdentityFile.decrypt_rsa (  )  [package]
boolean com.jcraft.jsch.IdentityFile.equals ( Object  o  ) 

Definition at line 919 of file IdentityFile.java.

References com.jcraft.jsch.IdentityFile.getName().

void com.jcraft.jsch.IdentityFile.finalize (  ) 

Definition at line 933 of file IdentityFile.java.

References com.jcraft.jsch.IdentityFile.clear().

String com.jcraft.jsch.IdentityFile.getAlgName (  ) 

Returns the name of the algorithm.

This will be sent together with the public key to the server for authorization purposes. The server will use the signature checking algorithm to check the signature.

Implements com.jcraft.jsch.Identity.

Definition at line 411 of file IdentityFile.java.

References com.jcraft.jsch.IdentityFile.RSA, and com.jcraft.jsch.IdentityFile.type.

String com.jcraft.jsch.IdentityFile.getName (  ) 

returns the name of this identity.

This is only used by the library for bookkeeping purposes (and allows the application to JSch#removeIdentity remove an identity), is not sent to the server.

Implements com.jcraft.jsch.Identity.

Definition at line 908 of file IdentityFile.java.

References com.jcraft.jsch.IdentityFile.identity.

Referenced by com.jcraft.jsch.IdentityFile.equals().

byte [] com.jcraft.jsch.IdentityFile.getPublicKeyBlob (  ) 

Returns the public key data.

This will be sent to the server, which then will check the key is authorized for this user (and whether the signature is done with the corresponding private key).

Implements com.jcraft.jsch.Identity.

Definition at line 469 of file IdentityFile.java.

References com.jcraft.jsch.IdentityFile.getPublicKeyBlob_dss(), com.jcraft.jsch.IdentityFile.getPublicKeyBlob_rsa(), com.jcraft.jsch.IdentityFile.publickeyblob, com.jcraft.jsch.IdentityFile.RSA, and com.jcraft.jsch.IdentityFile.type.

byte [] com.jcraft.jsch.IdentityFile.getPublicKeyBlob_dss (  )  [package]
byte [] com.jcraft.jsch.IdentityFile.getPublicKeyBlob_rsa (  )  [package]
byte [] com.jcraft.jsch.IdentityFile.getSignature ( byte[]  data  ) 
byte [] com.jcraft.jsch.IdentityFile.getSignature_dss ( byte[]  data  )  [package]
byte [] com.jcraft.jsch.IdentityFile.getSignature_rsa ( byte[]  data  )  [package]
boolean com.jcraft.jsch.IdentityFile.isEncrypted (  ) 

Definition at line 904 of file IdentityFile.java.

References com.jcraft.jsch.IdentityFile.encrypted.

static IdentityFile com.jcraft.jsch.IdentityFile.newInstance ( String  name,
byte[]  prvkey,
byte[]  pubkey,
JSch  jsch 
) throws JSchException [static, package]

Creates a new IdentityFile instance from the public and private key data.

The private key array will be zeroed out after reading.

Definition at line 148 of file IdentityFile.java.

References com.jcraft.jsch.IdentityFile.IdentityFile(), and com.jcraft.jsch.IdentityFile.jsch.

static IdentityFile com.jcraft.jsch.IdentityFile.newInstance ( String  prvfile,
String  pubfile,
JSch  jsch 
) throws JSchException [static, package]

Creates a new IdentityFile instance from the public and private key file names.

Definition at line 85 of file IdentityFile.java.

References com.jcraft.jsch.IdentityFile.jsch.

boolean com.jcraft.jsch.IdentityFile.setPassphrase ( byte[]  _passphrase  )  throws JSchException

Member Data Documentation

String com.jcraft.jsch.IdentityFile.algname = "ssh-rsa" [private]

Definition at line 62 of file IdentityFile.java.

final int com.jcraft.jsch.IdentityFile.DSS = 2 [static, private]

Definition at line 66 of file IdentityFile.java.

Referenced by com.jcraft.jsch.IdentityFile.IdentityFile().

boolean com.jcraft.jsch.IdentityFile.encrypted = true [private]
final int com.jcraft.jsch.IdentityFile.ERROR = 0 [static, private]

Definition at line 64 of file IdentityFile.java.

Referenced by com.jcraft.jsch.IdentityFile.IdentityFile().

final int com.jcraft.jsch.IdentityFile.FSECURE = 1 [static, private]
final int com.jcraft.jsch.IdentityFile.OPENSSH = 0 [static, private]
final int com.jcraft.jsch.IdentityFile.PUTTY = 2 [static, private]

Definition at line 71 of file IdentityFile.java.

final int com.jcraft.jsch.IdentityFile.RSA = 1 [static, private]
final int com.jcraft.jsch.IdentityFile.UNKNOWN = 3 [static, private]

Definition at line 67 of file IdentityFile.java.

Referenced by com.jcraft.jsch.IdentityFile.IdentityFile().


The documentation for this class was generated from the following file:

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1