com.jcraft.jsch.KeyPairDSA Class Reference

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

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

List of all members.

Public Member Functions

 KeyPairDSA (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[] P_array
byte[] Q_array
byte[] G_array
byte[] pub_array
byte[] prv_array
int key_size = 1024

Static Private Attributes

static final byte[] begin = Util.str2byte("-----BEGIN DSA PRIVATE KEY-----")
static final byte[] end = Util.str2byte("-----END DSA PRIVATE KEY-----")
static final byte[] sshdss = Util.str2byte("ssh-dss")

Detailed Description

Usually not to be used by applications.

The KeyPair implementation for a DSA key pair.

There is no reason this class should be public.

Definition at line 38 of file KeyPairDSA.java.


Constructor & Destructor Documentation

com.jcraft.jsch.KeyPairDSA.KeyPairDSA ( JSch  jsch  ) 

Definition at line 48 of file KeyPairDSA.java.


Member Function Documentation

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

Definition at line 223 of file KeyPairDSA.java.

References com.jcraft.jsch.KeyPairDSA.prv_array.

void com.jcraft.jsch.KeyPairDSA.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.KeyPairDSA.getBegin (  )  [package, virtual]

Implements com.jcraft.jsch.KeyPair.

Definition at line 77 of file KeyPairDSA.java.

References com.jcraft.jsch.KeyPairDSA.begin.

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

Implements com.jcraft.jsch.KeyPair.

Definition at line 78 of file KeyPairDSA.java.

References com.jcraft.jsch.KeyPairDSA.end.

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

Implements com.jcraft.jsch.KeyPair.

Definition at line 222 of file KeyPairDSA.java.

References com.jcraft.jsch.KeyPairDSA.key_size.

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

Definition at line 220 of file KeyPairDSA.java.

References com.jcraft.jsch.KeyPair.DSA.

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

Definition at line 219 of file KeyPairDSA.java.

References com.jcraft.jsch.KeyPairDSA.sshdss.

byte [] com.jcraft.jsch.KeyPairDSA.getPrivateKey (  )  [package]
byte [] com.jcraft.jsch.KeyPairDSA.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.KeyPairDSA.parse ( byte[]  plain  )  [package]

Member Data Documentation

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

Definition at line 74 of file KeyPairDSA.java.

Referenced by com.jcraft.jsch.KeyPairDSA.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.KeyPairDSA.end = Util.str2byte("-----END DSA PRIVATE KEY-----") [static, private]

Definition at line 75 of file KeyPairDSA.java.

Referenced by com.jcraft.jsch.KeyPairDSA.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.KeyPairDSA.sshdss = Util.str2byte("ssh-dss") [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