Usually not to be used by applications. More...
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") |
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.
com.jcraft.jsch.KeyPairDSA.KeyPairDSA | ( | JSch | jsch | ) |
Definition at line 48 of file KeyPairDSA.java.
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] |
Implements com.jcraft.jsch.KeyPair.
Definition at line 52 of file KeyPairDSA.java.
References com.jcraft.jsch.KeyPairDSA.G_array, com.jcraft.jsch.KeyPair.jsch, com.jcraft.jsch.KeyPairDSA.key_size, com.jcraft.jsch.KeyPairDSA.P_array, com.jcraft.jsch.KeyPairDSA.prv_array, com.jcraft.jsch.KeyPairDSA.pub_array, and com.jcraft.jsch.KeyPairDSA.Q_array.
static KeyPair com.jcraft.jsch.KeyPair.genKeyPair | ( | JSch | jsch, | |
int | type, | |||
int | key_size | |||
) | throws JSchException [static, inherited] |
Creates a new key pair.
jsch | the JSch object used for configuration purposes. | |
type | one of DSA and RSA. | |
key_size | the size of the keys, in bits. |
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.
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] |
Definition at line 80 of file KeyPairDSA.java.
References com.jcraft.jsch.KeyPairDSA.G_array, com.jcraft.jsch.KeyPairDSA.P_array, com.jcraft.jsch.KeyPairDSA.prv_array, com.jcraft.jsch.KeyPairDSA.pub_array, and com.jcraft.jsch.KeyPairDSA.Q_array.
byte [] com.jcraft.jsch.KeyPairDSA.getPublicKeyBlob | ( | ) |
Definition at line 199 of file KeyPairDSA.java.
References com.jcraft.jsch.Buffer.buffer, com.jcraft.jsch.KeyPairDSA.G_array, com.jcraft.jsch.KeyPairDSA.P_array, com.jcraft.jsch.KeyPairDSA.pub_array, com.jcraft.jsch.KeyPairDSA.Q_array, and com.jcraft.jsch.KeyPairDSA.sshdss.
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] |
Definition at line 104 of file KeyPairDSA.java.
References com.jcraft.jsch.KeyPairDSA.G_array, com.jcraft.jsch.KeyPairDSA.P_array, com.jcraft.jsch.KeyPairDSA.prv_array, com.jcraft.jsch.KeyPairDSA.pub_array, com.jcraft.jsch.KeyPairDSA.Q_array, com.jcraft.jsch.KeyPair.vendor, and com.jcraft.jsch.KeyPair.VENDOR_FSECURE.
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.
byte [] com.jcraft.jsch.KeyPairDSA.G_array [private] |
Definition at line 41 of file KeyPairDSA.java.
Referenced by com.jcraft.jsch.KeyPairDSA.generate(), com.jcraft.jsch.KeyPairDSA.getPrivateKey(), com.jcraft.jsch.KeyPairDSA.getPublicKeyBlob(), and com.jcraft.jsch.KeyPairDSA.parse().
JSch com.jcraft.jsch.KeyPair.jsch = null [package, inherited] |
Definition at line 117 of file KeyPair.java.
Referenced by com.jcraft.jsch.KeyPairRSA.generate(), com.jcraft.jsch.KeyPairDSA.generate(), and com.jcraft.jsch.KeyPair.genKeyPair().
int com.jcraft.jsch.KeyPairDSA.key_size = 1024 [private] |
Definition at line 46 of file KeyPairDSA.java.
Referenced by com.jcraft.jsch.KeyPairDSA.generate(), and com.jcraft.jsch.KeyPairDSA.getKeySize().
byte [] com.jcraft.jsch.KeyPairDSA.P_array [private] |
Definition at line 39 of file KeyPairDSA.java.
Referenced by com.jcraft.jsch.KeyPairDSA.generate(), com.jcraft.jsch.KeyPairDSA.getPrivateKey(), com.jcraft.jsch.KeyPairDSA.getPublicKeyBlob(), and com.jcraft.jsch.KeyPairDSA.parse().
byte [] com.jcraft.jsch.KeyPairDSA.prv_array [private] |
Definition at line 43 of file KeyPairDSA.java.
Referenced by com.jcraft.jsch.KeyPairDSA.dispose(), com.jcraft.jsch.KeyPairDSA.generate(), com.jcraft.jsch.KeyPairDSA.getPrivateKey(), and com.jcraft.jsch.KeyPairDSA.parse().
byte [] com.jcraft.jsch.KeyPairDSA.pub_array [private] |
Definition at line 42 of file KeyPairDSA.java.
Referenced by com.jcraft.jsch.KeyPairDSA.generate(), com.jcraft.jsch.KeyPairDSA.getPrivateKey(), com.jcraft.jsch.KeyPairDSA.getPublicKeyBlob(), and com.jcraft.jsch.KeyPairDSA.parse().
byte [] com.jcraft.jsch.KeyPairDSA.Q_array [private] |
Definition at line 40 of file KeyPairDSA.java.
Referenced by com.jcraft.jsch.KeyPairDSA.generate(), com.jcraft.jsch.KeyPairDSA.getPrivateKey(), com.jcraft.jsch.KeyPairDSA.getPublicKeyBlob(), and com.jcraft.jsch.KeyPairDSA.parse().
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] |
Definition at line 218 of file KeyPairDSA.java.
Referenced by com.jcraft.jsch.KeyPairDSA.getKeyTypeName(), and com.jcraft.jsch.KeyPairDSA.getPublicKeyBlob().
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] |
Definition at line 73 of file KeyPair.java.
Referenced by com.jcraft.jsch.KeyPairRSA.parse(), and com.jcraft.jsch.KeyPairDSA.parse().
final int com.jcraft.jsch.KeyPair.VENDOR_FSECURE = 1 [static, package, inherited] |
Definition at line 72 of file KeyPair.java.
Referenced by com.jcraft.jsch.KeyPairRSA.parse(), and com.jcraft.jsch.KeyPairDSA.parse().
final int com.jcraft.jsch.KeyPair.VENDOR_OPENSSH = 0 [static, package, inherited] |
Definition at line 71 of file KeyPair.java.