public class Ssh2EcdsaSha2NistPublicKey extends java.lang.Object implements SshPublicKey
| Modifier and Type | Field and Description |
|---|---|
protected java.security.interfaces.ECPublicKey |
pub |
| Modifier | Constructor and Description |
|---|---|
|
Ssh2EcdsaSha2NistPublicKey(java.security.interfaces.ECPublicKey pub,
java.lang.String curve) |
protected |
Ssh2EcdsaSha2NistPublicKey(java.lang.String name,
java.lang.String spec,
java.lang.String curve,
java.lang.String nistpCurve) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAlgorithm()
Get the algorithm name for the public key.
|
int |
getBitLength()
Get the bit length of the public key
|
java.lang.String |
getCurve() |
java.security.spec.ECParameterSpec |
getCurveParams(java.lang.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.
|
java.lang.String |
getEncodingAlgorithm()
The algorithm name used in the encoding of the public key
|
java.lang.String |
getFingerprint()
Return an SSH fingerprint of the public key
|
java.security.PublicKey |
getJCEPublicKey()
Return the JCE component for this key.
|
byte[] |
getOid() |
int |
getPriority() |
byte[] |
getPublicOctet() |
SecurityLevel |
getSecurityLevel() |
java.lang.String |
getSigningAlgorithm()
The algorithm name expected to be encoded in SSH signatures
|
int |
hashCode() |
void |
init(byte[] blob,
int start,
int len)
Initialize the public key from a blob of binary data.
|
java.lang.String |
test()
Test the JCE for algorithm availability.
|
boolean |
verifySignature(byte[] signature,
byte[] data)
Verify the signature.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitisCertificatepublic Ssh2EcdsaSha2NistPublicKey(java.security.interfaces.ECPublicKey pub,
java.lang.String curve)
throws java.io.IOException
java.io.IOExceptionprotected Ssh2EcdsaSha2NistPublicKey(java.lang.String name,
java.lang.String spec,
java.lang.String curve,
java.lang.String nistpCurve)
public SecurityLevel getSecurityLevel()
getSecurityLevel in interface SecureComponentpublic int getPriority()
getPriority in interface SecureComponentpublic void init(byte[] blob,
int start,
int len)
throws SshException
SshPublicKeyinit in interface SshPublicKeySshExceptionpublic java.lang.String getAlgorithm()
SshPublicKeygetAlgorithm in interface SshPublicKeygetAlgorithm in interface SecureComponentpublic java.lang.String getEncodingAlgorithm()
SshPublicKeygetEncodingAlgorithm in interface SshPublicKeypublic int getBitLength()
SshPublicKeygetBitLength in interface SshPublicKeypublic byte[] getEncoded()
throws SshException
SshPublicKeygetEncoded in interface SshPublicKeySshExceptionpublic byte[] getPublicOctet()
public java.lang.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 java.security.spec.ECParameterSpec getCurveParams(java.lang.String curve)
public java.security.PublicKey getJCEPublicKey()
SshPublicKeygetJCEPublicKey in interface SshPublicKeypublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String getSigningAlgorithm()
SshPublicKeygetSigningAlgorithm in interface SshPublicKeypublic java.lang.String test()
SshPublicKeytest in interface SshPublicKeypublic byte[] getOid()
public java.lang.String getCurve()
Copyright © 2022. All rights reserved.