net.adamcin.httpsig.ssh.jsch
Class JschKey
java.lang.Object
net.adamcin.httpsig.ssh.jsch.JschKey
- All Implemented Interfaces:
- Key, FingerprintableKey
public class JschKey
- extends Object
- implements FingerprintableKey
|
Constructor Summary |
JschKey(com.jcraft.jsch.Identity identity)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JschKey
public JschKey(com.jcraft.jsch.Identity identity)
getId
public String getId()
- Specified by:
getId in interface Key
getFingerprint
public String getFingerprint()
- Specified by:
getFingerprint in interface FingerprintableKey
getAlgorithms
public Set<Algorithm> getAlgorithms()
- Specified by:
getAlgorithms in interface Key
verify
public boolean verify(Algorithm algorithm,
byte[] challengeHash,
byte[] signatureBytes)
-
- Specified by:
verify in interface Key
- Parameters:
algorithm - the selected Signature AlgorithmchallengeHash - the result of RequestContent.getContent(java.util.List, java.nio.charset.Charset)signatureBytes - the result of Authorization.getSignatureBytes()
- Returns:
canVerify
public boolean canVerify()
- Specified by:
canVerify in interface Key
canSign
public boolean canSign()
- Specified by:
canSign in interface Key
sign
public byte[] sign(Algorithm algorithm,
byte[] challengeHash)
-
- Specified by:
sign in interface Key
- Parameters:
algorithm - the selected Signature AlgorithmchallengeHash - the result of RequestContent.getContent(java.util.List, java.nio.charset.Charset)
- Returns:
getIdentities
public static Keychain getIdentities(com.jcraft.jsch.JSch jSch)
Copyright © 2013-2014. All Rights Reserved.