Package com.jcraft.jsch
Class KeyPairPKCS8
- java.lang.Object
-
- com.jcraft.jsch.KeyPair
-
- com.jcraft.jsch.KeyPairPKCS8
-
public class KeyPairPKCS8 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[]
aes128cbc
private static byte[]
aes192cbc
private static byte[]
aes256cbc
private static byte[]
begin
private static byte[]
dsaEncryption
private static byte[]
end
private KeyPair
kpair
private static byte[]
pbes2
private static byte[]
pbeWithMD5AndDESCBC
private static byte[]
pbkdf2
private static byte[]
rsaEncryption
-
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 KeyPairPKCS8(JSch jsch)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
decrypt(byte[] _passphrase)
byte[]
forSSHAgent()
(package private) void
generate(int key_size)
(package private) byte[]
getBegin()
(package private) Cipher
getCipher(byte[] id)
(package private) byte[]
getEnd()
int
getKeySize()
int
getKeyType()
(package private) byte[]
getKeyTypeName()
(package private) byte[]
getPrivateKey()
byte[]
getPublicKeyBlob()
Returns the blob of the public key.byte[]
getSignature(byte[] data)
Signature
getVerifier()
(package private) boolean
parse(byte[] plain)
-
Methods inherited from class com.jcraft.jsch.KeyPair
copy, countLength, decrypt, dispose, 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
-
rsaEncryption
private static final byte[] rsaEncryption
-
dsaEncryption
private static final byte[] dsaEncryption
-
pbes2
private static final byte[] pbes2
-
pbkdf2
private static final byte[] pbkdf2
-
aes128cbc
private static final byte[] aes128cbc
-
aes192cbc
private static final byte[] aes192cbc
-
aes256cbc
private static final byte[] aes256cbc
-
pbeWithMD5AndDESCBC
private static final byte[] pbeWithMD5AndDESCBC
-
kpair
private KeyPair kpair
-
begin
private static final byte[] begin
-
end
private static final byte[] end
-
-
Constructor Detail
-
KeyPairPKCS8
public KeyPairPKCS8(JSch jsch)
-
-
Method Detail
-
generate
void generate(int key_size) throws JSchException
- Specified by:
generate
in classKeyPair
- Throws:
JSchException
-
getPrivateKey
byte[] getPrivateKey()
- Specified by:
getPrivateKey
in classKeyPair
-
getPublicKeyBlob
public byte[] getPublicKeyBlob()
Description copied from class:KeyPair
Returns the blob of the public key.- Overrides:
getPublicKeyBlob
in classKeyPair
- Returns:
- blob of the public key
-
getKeyTypeName
byte[] getKeyTypeName()
- Specified by:
getKeyTypeName
in classKeyPair
-
getKeyType
public int getKeyType()
- Specified by:
getKeyType
in classKeyPair
-
getKeySize
public int getKeySize()
- Specified by:
getKeySize
in classKeyPair
-
getSignature
public byte[] getSignature(byte[] data)
- Specified by:
getSignature
in classKeyPair
-
getVerifier
public Signature getVerifier()
- Specified by:
getVerifier
in classKeyPair
-
forSSHAgent
public byte[] forSSHAgent() throws JSchException
- Specified by:
forSSHAgent
in classKeyPair
- Throws:
JSchException
-
getCipher
Cipher getCipher(byte[] id)
-
-