public class SshEd25519PublicKeyJCE extends Object implements SshEd25519PublicKey
Modifier and Type | Field and Description |
---|---|
static String |
ALGORITHM_NAME |
static byte[] |
ASN_HEADER |
Constructor and Description |
---|
SshEd25519PublicKeyJCE() |
SshEd25519PublicKeyJCE(byte[] pk) |
SshEd25519PublicKeyJCE(PublicKey pub) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
byte[] |
getA() |
String |
getAlgorithm()
Get the algorithm name for the public key.
|
int |
getBitLength()
Get the bit length of the public key
|
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 |
getEncodingAlgorithm()
The algorithm name used in the encoding of the public key
|
String |
getFingerprint()
Return an SSH fingerprint of the public key
|
PublicKey |
getJCEPublicKey()
Get the JCE component of this key.
|
int |
getPriority() |
SecurityLevel |
getSecurityLevel() |
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.
|
String |
test()
Test the JCE for algorithm availability.
|
boolean |
verifySignature(byte[] signature,
byte[] data)
Verify the signature.
|
public static final byte[] ASN_HEADER
public static final String ALGORITHM_NAME
public SshEd25519PublicKeyJCE()
public SshEd25519PublicKeyJCE(byte[] pk) throws NoSuchAlgorithmException, InvalidKeySpecException, IOException, NoSuchProviderException
public SshEd25519PublicKeyJCE(PublicKey pub)
public SecurityLevel getSecurityLevel()
getSecurityLevel
in interface SecureComponent
public int getPriority()
getPriority
in interface SecureComponent
public void init(byte[] blob, int start, int len) throws SshException
SshPublicKey
init
in interface SshPublicKey
SshException
public String getAlgorithm()
SshPublicKey
getAlgorithm
in interface SshPublicKey
getAlgorithm
in interface SecureComponent
public String getEncodingAlgorithm()
SshPublicKey
getEncodingAlgorithm
in interface SshPublicKey
public int getBitLength()
SshPublicKey
getBitLength
in interface SshPublicKey
public byte[] getEncoded() throws SshException
SshPublicKey
getEncoded
in interface SshPublicKey
SshException
public byte[] getA()
getA
in interface SshEd25519PublicKey
public String getFingerprint() throws SshException
SshPublicKey
getFingerprint
in interface SshPublicKey
SshException
public boolean verifySignature(byte[] signature, byte[] data) throws SshException
SshPublicKey
verifySignature
in interface SshPublicKey
true
if the signature was produced by the corresponding
private key that owns this public key, otherwise false
.SshException
public String getSigningAlgorithm()
SshPublicKey
getSigningAlgorithm
in interface SshPublicKey
public String test()
SshPublicKey
test
in interface SshPublicKey
public PublicKey getJCEPublicKey()
SshPublicKey
getJCEPublicKey
in interface SshPublicKey
Copyright © 2024. All rights reserved.