org.gridkit.internal.com.jcraft.jsch
Class KeyPair
java.lang.Object
org.gridkit.internal.com.jcraft.jsch.KeyPair
- Direct Known Subclasses:
- KeyPairDSA, KeyPairRSA
public abstract class KeyPair
- extends Object
|
Method Summary |
boolean |
decrypt(byte[] _passphrase)
|
boolean |
decrypt(String _passphrase)
|
void |
dispose()
|
void |
finalize()
|
static KeyPair |
genKeyPair(JSch jsch,
int type)
|
static KeyPair |
genKeyPair(JSch jsch,
int type,
int key_size)
|
String |
getFingerPrint()
|
abstract int |
getKeyType()
|
byte[] |
getPublicKeyBlob()
|
String |
getPublicKeyComment()
|
boolean |
isEncrypted()
|
static KeyPair |
load(JSch jsch,
String prvkey)
|
static KeyPair |
load(JSch jsch,
String prvkey,
String pubkey)
|
void |
setPassphrase(byte[] passphrase)
|
void |
setPassphrase(String passphrase)
|
void |
writePrivateKey(OutputStream out)
|
void |
writePrivateKey(String name)
|
void |
writePublicKey(OutputStream out,
String comment)
|
void |
writePublicKey(String name,
String comment)
|
void |
writeSECSHPublicKey(OutputStream out,
String comment)
|
void |
writeSECSHPublicKey(String name,
String comment)
|
ERROR
public static final int ERROR
- See Also:
- Constant Field Values
DSA
public static final int DSA
- See Also:
- Constant Field Values
RSA
public static final int RSA
- See Also:
- Constant Field Values
UNKNOWN
public static final int UNKNOWN
- See Also:
- Constant Field Values
KeyPair
public KeyPair(JSch jsch)
genKeyPair
public static KeyPair genKeyPair(JSch jsch,
int type)
throws JSchException
- Throws:
JSchException
genKeyPair
public static KeyPair genKeyPair(JSch jsch,
int type,
int key_size)
throws JSchException
- Throws:
JSchException
getPublicKeyComment
public String getPublicKeyComment()
writePrivateKey
public void writePrivateKey(OutputStream out)
getKeyType
public abstract int getKeyType()
getPublicKeyBlob
public byte[] getPublicKeyBlob()
writePublicKey
public void writePublicKey(OutputStream out,
String comment)
writePublicKey
public void writePublicKey(String name,
String comment)
throws FileNotFoundException,
IOException
- Throws:
FileNotFoundException
IOException
writeSECSHPublicKey
public void writeSECSHPublicKey(OutputStream out,
String comment)
writeSECSHPublicKey
public void writeSECSHPublicKey(String name,
String comment)
throws FileNotFoundException,
IOException
- Throws:
FileNotFoundException
IOException
writePrivateKey
public void writePrivateKey(String name)
throws FileNotFoundException,
IOException
- Throws:
FileNotFoundException
IOException
getFingerPrint
public String getFingerPrint()
setPassphrase
public void setPassphrase(String passphrase)
setPassphrase
public void setPassphrase(byte[] passphrase)
isEncrypted
public boolean isEncrypted()
decrypt
public boolean decrypt(String _passphrase)
decrypt
public boolean decrypt(byte[] _passphrase)
load
public static KeyPair load(JSch jsch,
String prvkey)
throws JSchException
- Throws:
JSchException
load
public static KeyPair load(JSch jsch,
String prvkey,
String pubkey)
throws JSchException
- Throws:
JSchException
dispose
public void dispose()
finalize
public void finalize()
- Overrides:
finalize in class Object
Copyright © 2017. All Rights Reserved.