com.jcraft.jsch.KeyPairRSA Class Reference

Usually not to be used by applications. More...

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

List of all members.

Public Member Functions

 KeyPairRSA (JSch jsch)
byte[] getPublicKeyBlob ()
int getKeyType ()
int getKeySize ()
void dispose ()
String getPublicKeyComment ()

Static Public Member Functions

static KeyPair genKeyPair (JSch jsch, int type) throws JSchException
 Creates a new key pair with default key size of 1024 bits.
static KeyPair genKeyPair (JSch jsch, int type, int key_size) throws JSchException
 Creates a new key pair.

Static Public Attributes

static final int ERROR = 0
 Key type constant: some error occured, or the keypair was not initialized.
static final int DSA = 1
 Key type constant: DSA.
static final int RSA = 2
 Key type constant: RSA.
static final int UNKNOWN = 3
 Key type constant: unknown key type.

Package Functions

void generate (int key_size) throws JSchException
byte[] getBegin ()
byte[] getEnd ()
byte[] getPrivateKey ()
boolean parse (byte[] plain)
byte[] getKeyTypeName ()

Package Attributes

int vendor = VENDOR_OPENSSH
JSch jsch = null

Static Package Attributes

static final int VENDOR_OPENSSH = 0
static final int VENDOR_FSECURE = 1

Private Attributes

byte[] prv_array
byte[] pub_array
byte[] n_array
byte[] p_array
byte[] q_array
byte[] ep_array
byte[] eq_array
byte[] c_array
int key_size = 1024

Static Private Attributes

static final byte[] begin = Util.str2byte("-----BEGIN RSA PRIVATE KEY-----")
static final byte[] end = Util.str2byte("-----END RSA PRIVATE KEY-----")
static final byte[] sshrsa = Util.str2byte("ssh-rsa")

Detailed Description

Usually not to be used by applications.

The KeyPair implementation for an RSA key pair.

There is no reason this class should be public.

Definition at line 38 of file KeyPairRSA.java.


Constructor & Destructor Documentation

com.jcraft.jsch.KeyPairRSA.KeyPairRSA ( JSch  jsch  ) 

Definition at line 52 of file KeyPairRSA.java.


Member Function Documentation

void com.jcraft.jsch.KeyPairRSA.dispose (  ) 

Definition at line 322 of file KeyPairRSA.java.

References com.jcraft.jsch.KeyPairRSA.prv_array.

void com.jcraft.jsch.KeyPairRSA.generate ( int  key_size  )  throws JSchException [package, virtual]
static KeyPair com.jcraft.jsch.KeyPair.genKeyPair ( JSch  jsch,
int  type,
int  key_size 
) throws JSchException [static, inherited]

Creates a new key pair.

Parameters:
jsch the JSch object used for configuration purposes.
type one of DSA and RSA.
key_size the size of the keys, in bits.
Returns:
null if a unknown type constant is given, else the new key pair.

Definition at line 96 of file KeyPair.java.

References com.jcraft.jsch.KeyPair.DSA, com.jcraft.jsch.KeyPair.generate(), com.jcraft.jsch.KeyPair.jsch, and com.jcraft.jsch.KeyPair.RSA.

static KeyPair com.jcraft.jsch.KeyPair.genKeyPair ( JSch  jsch,
int  type 
) throws JSchException [static, inherited]

Creates a new key pair with default key size of 1024 bits.

Parameters:
jsch the JSch object used for configuration purposes.
type one of DSA and RSA.
Returns:
null if a unknown type constant is given, else the new key pair.

Definition at line 84 of file KeyPair.java.

References com.jcraft.jsch.KeyPair.jsch.

byte [] com.jcraft.jsch.KeyPairRSA.getBegin (  )  [package, virtual]

Implements com.jcraft.jsch.KeyPair.

Definition at line 85 of file KeyPairRSA.java.

References com.jcraft.jsch.KeyPairRSA.begin.

byte [] com.jcraft.jsch.KeyPairRSA.getEnd (  )  [package, virtual]

Implements com.jcraft.jsch.KeyPair.

Definition at line 86 of file KeyPairRSA.java.

References com.jcraft.jsch.KeyPairRSA.end.

int com.jcraft.jsch.KeyPairRSA.getKeySize (  )  [virtual]

Implements com.jcraft.jsch.KeyPair.

Definition at line 321 of file KeyPairRSA.java.

References com.jcraft.jsch.KeyPairRSA.key_size.

int com.jcraft.jsch.KeyPairRSA.getKeyType (  ) 

Definition at line 319 of file KeyPairRSA.java.

References com.jcraft.jsch.KeyPair.RSA.

byte [] com.jcraft.jsch.KeyPairRSA.getKeyTypeName (  )  [package]

Definition at line 318 of file KeyPairRSA.java.

References com.jcraft.jsch.KeyPairRSA.sshrsa.

byte [] com.jcraft.jsch.KeyPairRSA.getPrivateKey (  )  [package]
byte [] com.jcraft.jsch.KeyPairRSA.getPublicKeyBlob (  ) 
String com.jcraft.jsch.KeyPair.getPublicKeyComment (  )  [inherited]

Definition at line 112 of file KeyPair.java.

References com.jcraft.jsch.KeyPair.publicKeyComment.

boolean com.jcraft.jsch.KeyPairRSA.parse ( byte[]  plain  )  [package]

Member Data Documentation

final byte [] com.jcraft.jsch.KeyPairRSA.begin = Util.str2byte("-----BEGIN RSA PRIVATE KEY-----") [static, private]

Definition at line 82 of file KeyPairRSA.java.

Referenced by com.jcraft.jsch.KeyPairRSA.getBegin().

final int com.jcraft.jsch.KeyPair.DSA = 1 [static, inherited]

Key type constant: DSA.

Definition at line 60 of file KeyPair.java.

Referenced by com.jcraft.jsch.KeyPair.genKeyPair(), and com.jcraft.jsch.KeyPairDSA.getKeyType().

final byte [] com.jcraft.jsch.KeyPairRSA.end = Util.str2byte("-----END RSA PRIVATE KEY-----") [static, private]

Definition at line 83 of file KeyPairRSA.java.

Referenced by com.jcraft.jsch.KeyPairRSA.getEnd().

final int com.jcraft.jsch.KeyPair.ERROR = 0 [static, inherited]

Key type constant: some error occured, or the keypair was not initialized.

Definition at line 56 of file KeyPair.java.

JSch com.jcraft.jsch.KeyPair.jsch = null [package, inherited]
final int com.jcraft.jsch.KeyPair.RSA = 2 [static, inherited]

Key type constant: RSA.

Definition at line 64 of file KeyPair.java.

Referenced by com.jcraft.jsch.KeyPair.genKeyPair(), and com.jcraft.jsch.KeyPairRSA.getKeyType().

final byte [] com.jcraft.jsch.KeyPairRSA.sshrsa = Util.str2byte("ssh-rsa") [static, private]
final int com.jcraft.jsch.KeyPair.UNKNOWN = 3 [static, inherited]

Key type constant: unknown key type.

This should not be used by the application.

Definition at line 69 of file KeyPair.java.

int com.jcraft.jsch.KeyPair.vendor = VENDOR_OPENSSH [package, inherited]
final int com.jcraft.jsch.KeyPair.VENDOR_FSECURE = 1 [static, package, inherited]
final int com.jcraft.jsch.KeyPair.VENDOR_OPENSSH = 0 [static, package, inherited]

Definition at line 71 of file KeyPair.java.


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

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1