public class OpenSshEd25519Certificate extends OpenSshCertificate implements SshPublicKey
Modifier and Type | Field and Description |
---|---|
static String |
CERT_TYPE |
OPTION_FORCE_COMMAND, OPTION_SOURCE_ADDRESS, PERMIT_AGENT_FORWARDING, PERMIT_PORT_FORWARDING, PERMIT_USER_PTY, PERMIT_USER_RC, PERMIT_X11_FORWARDING, SSH_CERT_TYPE_HOST, SSH_CERT_TYPE_USER
Constructor and Description |
---|
OpenSshEd25519Certificate() |
OpenSshEd25519Certificate(byte[] pk) |
OpenSshEd25519Certificate(PublicKey pub) |
Modifier and Type | Method and Description |
---|---|
protected void |
decodePublicKey(ByteArrayReader reader) |
boolean |
equals(Object obj) |
String |
getAlgorithm()
Get the algorithm name for the public key.
|
int |
getBitLength()
Get the bit length 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() |
String |
test()
Test the JCE for algorithm availability.
|
boolean |
verifySignature(byte[] signature,
byte[] data)
Verify the signature.
|
decodeCertificate, encodeCertificate, getCriticalOptions, getCriticalOptionsList, getEncoded, getEncodingAlgorithm, getExtension, getExtensions, getExtensionsList, getExtensionsMap, getFingerprint, getForcedCommand, getKeyId, getPrincipals, getSerial, getSignedBy, getSignedKey, getSourceAddresses, getType, getValidAfter, getValidBefore, init, init, isForceCommand, isHostCertificate, isUserCertificate, sign, verify
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getEncoded, getEncodingAlgorithm, getFingerprint, init
public static final String CERT_TYPE
public OpenSshEd25519Certificate()
public OpenSshEd25519Certificate(PublicKey pub)
public OpenSshEd25519Certificate(byte[] pk) throws NoSuchAlgorithmException, InvalidKeySpecException, IOException, NoSuchProviderException
public PublicKey getJCEPublicKey()
SshPublicKey
getJCEPublicKey
in interface SshPublicKey
public SecurityLevel getSecurityLevel()
getSecurityLevel
in interface SecureComponent
public int getPriority()
getPriority
in interface SecureComponent
public String getAlgorithm()
getAlgorithm
in interface SshPublicKey
getAlgorithm
in interface SecureComponent
public int getBitLength()
SshPublicKey
getBitLength
in interface SshPublicKey
protected void decodePublicKey(ByteArrayReader reader) throws IOException, SshException
decodePublicKey
in class OpenSshCertificate
IOException
SshException
public boolean verifySignature(byte[] signature, byte[] data) throws SshException
verifySignature
in interface SshPublicKey
signature
- byte[]data
- byte[]true
if the signature was produced by the
corresponding private key that owns this public key, otherwise
false
.SshException
public String test()
SshPublicKey
test
in interface SshPublicKey
public String getSigningAlgorithm()
SshPublicKey
getSigningAlgorithm
in interface SshPublicKey
getSigningAlgorithm
in class OpenSshCertificate
Copyright © 2024. All rights reserved.