Usually not to be used by applications. More...
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") |
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.
com.jcraft.jsch.KeyPairRSA.KeyPairRSA | ( | JSch | jsch | ) |
Definition at line 52 of file KeyPairRSA.java.
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] |
Implements com.jcraft.jsch.KeyPair.
Definition at line 56 of file KeyPairRSA.java.
References com.jcraft.jsch.KeyPairRSA.c_array, com.jcraft.jsch.KeyPairRSA.ep_array, com.jcraft.jsch.KeyPairRSA.eq_array, com.jcraft.jsch.KeyPair.jsch, com.jcraft.jsch.KeyPairRSA.key_size, com.jcraft.jsch.KeyPairRSA.n_array, com.jcraft.jsch.KeyPairRSA.p_array, com.jcraft.jsch.KeyPairRSA.prv_array, com.jcraft.jsch.KeyPairRSA.pub_array, and com.jcraft.jsch.KeyPairRSA.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.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] |
Definition at line 88 of file KeyPairRSA.java.
References com.jcraft.jsch.KeyPairRSA.c_array, com.jcraft.jsch.KeyPairRSA.ep_array, com.jcraft.jsch.KeyPairRSA.eq_array, com.jcraft.jsch.KeyPairRSA.n_array, com.jcraft.jsch.KeyPairRSA.p_array, com.jcraft.jsch.KeyPairRSA.prv_array, com.jcraft.jsch.KeyPairRSA.pub_array, and com.jcraft.jsch.KeyPairRSA.q_array.
byte [] com.jcraft.jsch.KeyPairRSA.getPublicKeyBlob | ( | ) |
Definition at line 302 of file KeyPairRSA.java.
References com.jcraft.jsch.Buffer.buffer, com.jcraft.jsch.KeyPairRSA.n_array, com.jcraft.jsch.KeyPairRSA.pub_array, and com.jcraft.jsch.KeyPairRSA.sshrsa.
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] |
Definition at line 118 of file KeyPairRSA.java.
References com.jcraft.jsch.KeyPairRSA.c_array, com.jcraft.jsch.KeyPairRSA.ep_array, com.jcraft.jsch.KeyPairRSA.eq_array, com.jcraft.jsch.KeyPairRSA.n_array, com.jcraft.jsch.KeyPairRSA.p_array, com.jcraft.jsch.KeyPairRSA.prv_array, com.jcraft.jsch.KeyPairRSA.pub_array, com.jcraft.jsch.KeyPairRSA.q_array, com.jcraft.jsch.KeyPair.vendor, and com.jcraft.jsch.KeyPair.VENDOR_FSECURE.
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().
byte [] com.jcraft.jsch.KeyPairRSA.c_array [private] |
Definition at line 47 of file KeyPairRSA.java.
Referenced by com.jcraft.jsch.KeyPairRSA.generate(), com.jcraft.jsch.KeyPairRSA.getPrivateKey(), and com.jcraft.jsch.KeyPairRSA.parse().
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().
byte [] com.jcraft.jsch.KeyPairRSA.ep_array [private] |
Definition at line 45 of file KeyPairRSA.java.
Referenced by com.jcraft.jsch.KeyPairRSA.generate(), com.jcraft.jsch.KeyPairRSA.getPrivateKey(), and com.jcraft.jsch.KeyPairRSA.parse().
byte [] com.jcraft.jsch.KeyPairRSA.eq_array [private] |
Definition at line 46 of file KeyPairRSA.java.
Referenced by com.jcraft.jsch.KeyPairRSA.generate(), com.jcraft.jsch.KeyPairRSA.getPrivateKey(), and com.jcraft.jsch.KeyPairRSA.parse().
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] |
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.KeyPairRSA.key_size = 1024 [private] |
Definition at line 50 of file KeyPairRSA.java.
Referenced by com.jcraft.jsch.KeyPairRSA.generate(), and com.jcraft.jsch.KeyPairRSA.getKeySize().
byte [] com.jcraft.jsch.KeyPairRSA.n_array [private] |
Definition at line 41 of file KeyPairRSA.java.
Referenced by com.jcraft.jsch.KeyPairRSA.generate(), com.jcraft.jsch.KeyPairRSA.getPrivateKey(), com.jcraft.jsch.KeyPairRSA.getPublicKeyBlob(), and com.jcraft.jsch.KeyPairRSA.parse().
byte [] com.jcraft.jsch.KeyPairRSA.p_array [private] |
Definition at line 43 of file KeyPairRSA.java.
Referenced by com.jcraft.jsch.KeyPairRSA.generate(), com.jcraft.jsch.KeyPairRSA.getPrivateKey(), and com.jcraft.jsch.KeyPairRSA.parse().
byte [] com.jcraft.jsch.KeyPairRSA.prv_array [private] |
Definition at line 39 of file KeyPairRSA.java.
Referenced by com.jcraft.jsch.KeyPairRSA.dispose(), com.jcraft.jsch.KeyPairRSA.generate(), com.jcraft.jsch.KeyPairRSA.getPrivateKey(), and com.jcraft.jsch.KeyPairRSA.parse().
byte [] com.jcraft.jsch.KeyPairRSA.pub_array [private] |
Definition at line 40 of file KeyPairRSA.java.
Referenced by com.jcraft.jsch.KeyPairRSA.generate(), com.jcraft.jsch.KeyPairRSA.getPrivateKey(), com.jcraft.jsch.KeyPairRSA.getPublicKeyBlob(), and com.jcraft.jsch.KeyPairRSA.parse().
byte [] com.jcraft.jsch.KeyPairRSA.q_array [private] |
Definition at line 44 of file KeyPairRSA.java.
Referenced by com.jcraft.jsch.KeyPairRSA.generate(), com.jcraft.jsch.KeyPairRSA.getPrivateKey(), and com.jcraft.jsch.KeyPairRSA.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.KeyPairRSA.sshrsa = Util.str2byte("ssh-rsa") [static, private] |
Definition at line 317 of file KeyPairRSA.java.
Referenced by com.jcraft.jsch.KeyPairRSA.getKeyTypeName(), and com.jcraft.jsch.KeyPairRSA.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.