Package com.jcraft.jsch
Class KeyPairRSA
- java.lang.Object
-
- com.jcraft.jsch.KeyPair
-
- com.jcraft.jsch.KeyPairRSA
-
public class KeyPairRSA extends KeyPair
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.jcraft.jsch.KeyPair
KeyPair.ASN1, KeyPair.ASN1Exception
-
-
Field Summary
Fields Modifier and Type Field Description private static byte[]beginprivate byte[]c_arrayprivate static byte[]endprivate byte[]ep_arrayprivate byte[]eq_arrayprivate intkey_sizeprivate byte[]n_arrayprivate byte[]p_arrayprivate byte[]prv_arrayprivate byte[]pub_arrayprivate byte[]q_arrayprivate static byte[]sshrsa-
Fields inherited from class com.jcraft.jsch.KeyPair
data, DSA, ECDSA, encrypted, ERROR, header, jsch, publicKeyComment, RSA, UNKNOWN, vendor, VENDOR_FSECURE, VENDOR_OPENSSH, VENDOR_PKCS8, VENDOR_PUTTY
-
-
Constructor Summary
Constructors Constructor Description KeyPairRSA(JSch jsch)KeyPairRSA(JSch jsch, byte[] n_array, byte[] pub_array, byte[] prv_array)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()byte[]forSSHAgent()(package private) static KeyPairfromSSHAgent(JSch jsch, Buffer buf)(package private) voidgenerate(int key_size)(package private) byte[]getBegin()private byte[]getCArray()(package private) byte[]getEnd()private byte[]getEPArray()private byte[]getEQArray()intgetKeySize()intgetKeyType()(package private) byte[]getKeyTypeName()(package private) byte[]getPrivateKey()byte[]getPublicKeyBlob()Returns the blob of the public key.byte[]getSignature(byte[] data)SignaturegetVerifier()(package private) booleanparse(byte[] plain)-
Methods inherited from class com.jcraft.jsch.KeyPair
copy, countLength, decrypt, decrypt, finalize, genKey, genKeyPair, genKeyPair, getFingerPrint, getPublicKeyComment, isEncrypted, load, load, load, loadPPK, setPassphrase, setPassphrase, setPublicKeyComment, writeDATA, writeINTEGER, writeLength, writeOCTETSTRING, writePrivateKey, writePrivateKey, writePrivateKey, writePrivateKey, writePublicKey, writePublicKey, writeSECSHPublicKey, writeSECSHPublicKey, writeSEQUENCE
-
-
-
-
Field Detail
-
n_array
private byte[] n_array
-
pub_array
private byte[] pub_array
-
prv_array
private byte[] prv_array
-
p_array
private byte[] p_array
-
q_array
private byte[] q_array
-
ep_array
private byte[] ep_array
-
eq_array
private byte[] eq_array
-
c_array
private byte[] c_array
-
key_size
private int key_size
-
begin
private static final byte[] begin
-
end
private static final byte[] end
-
sshrsa
private static final byte[] sshrsa
-
-
Method Detail
-
generate
void generate(int key_size) throws JSchException- Specified by:
generatein classKeyPair- Throws:
JSchException
-
getPrivateKey
byte[] getPrivateKey()
- Specified by:
getPrivateKeyin classKeyPair
-
getPublicKeyBlob
public byte[] getPublicKeyBlob()
Description copied from class:KeyPairReturns the blob of the public key.- Overrides:
getPublicKeyBlobin classKeyPair- Returns:
- blob of the public key
-
getKeyTypeName
byte[] getKeyTypeName()
- Specified by:
getKeyTypeNamein classKeyPair
-
getKeyType
public int getKeyType()
- Specified by:
getKeyTypein classKeyPair
-
getKeySize
public int getKeySize()
- Specified by:
getKeySizein classKeyPair
-
getSignature
public byte[] getSignature(byte[] data)
- Specified by:
getSignaturein classKeyPair
-
getVerifier
public Signature getVerifier()
- Specified by:
getVerifierin classKeyPair
-
fromSSHAgent
static KeyPair fromSSHAgent(JSch jsch, Buffer buf) throws JSchException
- Throws:
JSchException
-
forSSHAgent
public byte[] forSSHAgent() throws JSchException- Specified by:
forSSHAgentin classKeyPair- Throws:
JSchException
-
getEPArray
private byte[] getEPArray()
-
getEQArray
private byte[] getEQArray()
-
getCArray
private byte[] getCArray()
-
-