public class OpenSshRsaSha256Certificate extends OpenSshCertificate implements SshRsaPublicKey
| Modifier and Type | Field and Description |
|---|---|
static String |
SSH_RSA_CERT_V01 |
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 |
|---|
OpenSshRsaSha256Certificate()
Default constructor for initializing the key from a byte array using the
init method.
|
OpenSshRsaSha256Certificate(BigInteger modulus,
BigInteger publicExponent) |
OpenSshRsaSha256Certificate(RSAPublicKey pubKey) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
decodePublicKey(ByteArrayReader reader) |
BigInteger |
doPublic(BigInteger input) |
boolean |
equals(Object obj) |
String |
getAlgorithm()
Get the algorithm name for the public key.
|
int |
getBitLength()
Get the bit length of the public key
|
String |
getEncodingAlgorithm()
The algorithm name used in the encoding of the public key
|
PublicKey |
getJCEPublicKey()
Get the JCE component of this key.
|
BigInteger |
getModulus() |
int |
getPriority() |
BigInteger |
getPublicExponent() |
SecurityLevel |
getSecurityLevel() |
String |
getSigningAlgorithm()
The algorithm name expected to be encoded in SSH signatures
|
int |
getVersion() |
int |
hashCode() |
String |
test()
Test the JCE for algorithm availability.
|
boolean |
verifySignature(byte[] signature,
byte[] data)
Verify the signature.
|
decodeCertificate, encodeCertificate, getCriticalOptions, getCriticalOptionsList, getEncoded, getExtension, getExtensions, getExtensionsList, getExtensionsMap, getFingerprint, getForcedCommand, getKeyId, getPrincipals, getSerial, getSignedBy, getSignedKey, getSourceAddresses, getType, getValidAfter, getValidBefore, init, init, isForceCommand, isHostCertificate, isUserCertificate, sign, verifyclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetEncoded, getFingerprint, initpublic static final String SSH_RSA_CERT_V01
public OpenSshRsaSha256Certificate()
public OpenSshRsaSha256Certificate(RSAPublicKey pubKey)
public OpenSshRsaSha256Certificate(BigInteger modulus, BigInteger publicExponent) throws NoSuchAlgorithmException, InvalidKeySpecException
public SecurityLevel getSecurityLevel()
getSecurityLevel in interface SecureComponentpublic int getPriority()
getPriority in interface SecureComponentpublic int getBitLength()
SshPublicKeygetBitLength in interface SshPublicKeyprotected void decodePublicKey(ByteArrayReader reader) throws IOException, SshException
decodePublicKey in class OpenSshCertificateIOExceptionSshExceptionpublic String getAlgorithm()
SshPublicKeygetAlgorithm in interface SshPublicKeygetAlgorithm in interface SecureComponentpublic String getEncodingAlgorithm()
SshPublicKeygetEncodingAlgorithm in interface SshPublicKeygetEncodingAlgorithm in class OpenSshCertificatepublic 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 int getVersion()
getVersion in interface SshRsaPublicKeypublic PublicKey getJCEPublicKey()
SshPublicKeygetJCEPublicKey in interface SshPublicKeygetJCEPublicKey in interface SshRsaPublicKeypublic String test()
SshPublicKeytest in interface SshPublicKeypublic String getSigningAlgorithm()
SshPublicKeygetSigningAlgorithm in interface SshPublicKeygetSigningAlgorithm in class OpenSshCertificatepublic BigInteger getModulus()
getModulus in interface SshRsaPublicKeypublic BigInteger getPublicExponent()
getPublicExponent in interface SshRsaPublicKeypublic BigInteger doPublic(BigInteger input) throws SshException
doPublic in interface SshRsaPublicKeySshExceptionCopyright © 2025. All rights reserved.