public class Ssh2EcdsaSha2NistPublicKey extends Object implements SshPublicKey
| Modifier and Type | Field and Description |
|---|---|
protected ECPublicKey |
pub |
| Constructor and Description |
|---|
Ssh2EcdsaSha2NistPublicKey(ECPublicKey pub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getAlgorithm()
Get the algorithm name for the public key.
|
int |
getBitLength()
Get the bit length of the public key
|
ECParameterSpec |
getCurveParams(String curve) |
byte[] |
getEncoded()
Encode the public key into a blob of binary data, the encoded result will
be passed into init to recreate the key.
|
String |
getFingerprint()
Return an SSH fingerprint of the public key
|
PublicKey |
getJCEPublicKey() |
byte[] |
getPublicOctet() |
int |
hashCode() |
void |
init(byte[] blob,
int start,
int len)
Initialize the public key from a blob of binary data.
|
static void |
main(String[] args) |
boolean |
verifySignature(byte[] signature,
byte[] data)
Verify the signature.
|
protected ECPublicKey pub
public Ssh2EcdsaSha2NistPublicKey(ECPublicKey pub) throws IOException
IOExceptionpublic void init(byte[] blob,
int start,
int len)
throws SshException
SshPublicKeyinit in interface SshPublicKeySshExceptionpublic String getAlgorithm()
SshPublicKeygetAlgorithm in interface SshPublicKeypublic int getBitLength()
SshPublicKeygetBitLength in interface SshPublicKeypublic byte[] getEncoded()
throws SshException
SshPublicKeygetEncoded in interface SshPublicKeySshExceptionpublic byte[] getPublicOctet()
public String getFingerprint() throws SshException
SshPublicKeygetFingerprint in interface SshPublicKeySshExceptionpublic boolean verifySignature(byte[] signature,
byte[] data)
throws SshException
SshPublicKeyverifySignature in interface SshPublicKeytrue if the signature was produced by the
corresponding private key that owns this public key, otherwise
false.SshExceptionpublic ECParameterSpec getCurveParams(String curve)
public PublicKey getJCEPublicKey()
Copyright © 2016. All rights reserved.