public final class SSHKey extends Object implements FingerprintableKey
Key implementation for OpenSSH-compliant keys (RSA/DSA)| Constructor and Description |
|---|
SSHKey(KeyFormat keyFormat,
KeyPair keyPair) |
SSHKey(KeyFormat keyFormat,
PublicKey publicKey,
PrivateKey privateKey) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canSign() |
boolean |
canVerify() |
boolean |
equals(Object o) |
Set<Algorithm> |
getAlgorithms() |
String |
getFingerprint() |
String |
getId() |
int |
hashCode() |
byte[] |
sign(Algorithm algorithm,
byte[] challengeHash) |
boolean |
verify(Algorithm algorithm,
byte[] challengeHash,
byte[] signatureBytes) |
public SSHKey(KeyFormat keyFormat, PublicKey publicKey, PrivateKey privateKey)
public String getFingerprint()
getFingerprint in interface FingerprintableKeypublic Set<Algorithm> getAlgorithms()
getAlgorithms in interface Keypublic boolean verify(Algorithm algorithm, byte[] challengeHash, byte[] signatureBytes)
public byte[] sign(Algorithm algorithm, byte[] challengeHash)
Copyright © 2013. All Rights Reserved.