Package com.jcraft.jsch
Class KeyPairDeferred
java.lang.Object
com.jcraft.jsch.KeyPair
com.jcraft.jsch.KeyPairDeferred
public class KeyPairDeferred extends KeyPair
A
KeyPair which can only reveal its type and content after it was decrypted using decrypt(byte[]).
This is needed for openssh-v1-private-key format.-
Field Summary
-
Method Summary
Modifier and Type Method Description booleandecrypt(byte[] _passphrase)booleandecrypt(java.lang.String _passphrase)byte[]forSSHAgent()java.lang.StringgetFingerPrint()Returns the finger-print of the public key.intgetKeyType()byte[]getPublicKeyBlob()Returns the blob of the public key.java.lang.StringgetPublicKeyComment()byte[]getSignature(byte[] data)byte[]getSignature(byte[] data, java.lang.String alg)SignaturegetVerifier()SignaturegetVerifier(java.lang.String alg)booleanisEncrypted()Methods inherited from class com.jcraft.jsch.KeyPair
dispose, finalize, genKeyPair, genKeyPair, load, load, load, setPassphrase, setPassphrase, setPublicKeyComment, writePrivateKey, writePrivateKey, writePrivateKey, writePrivateKey, writePublicKey, writePublicKey, writeSECSHPublicKey, writeSECSHPublicKeyMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
decrypt
public boolean decrypt(java.lang.String _passphrase) -
decrypt
public boolean decrypt(byte[] _passphrase) -
getSignature
public byte[] getSignature(byte[] data)- Specified by:
getSignaturein classKeyPair
-
getSignature
public byte[] getSignature(byte[] data, java.lang.String alg)- Specified by:
getSignaturein classKeyPair
-
getVerifier
- Specified by:
getVerifierin classKeyPair
-
getVerifier
- Specified by:
getVerifierin classKeyPair
-
forSSHAgent
- Specified by:
forSSHAgentin classKeyPair- Throws:
JSchException
-
getKeyType
public int getKeyType()- Specified by:
getKeyTypein 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
-
getPublicKeyComment
public java.lang.String getPublicKeyComment()- Overrides:
getPublicKeyCommentin classKeyPair
-
getFingerPrint
public java.lang.String getFingerPrint()Description copied from class:KeyPairReturns the finger-print of the public key.- Overrides:
getFingerPrintin classKeyPair- Returns:
- finger print
-
isEncrypted
public boolean isEncrypted()- Overrides:
isEncryptedin classKeyPair
-