public interface SshPublicKey extends SecureComponent
Interface for SSH supported public keys.
Modifier and Type | Method and Description |
---|---|
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.
|
String |
getSigningAlgorithm()
The algorithm name expected to be encoded in SSH signatures
|
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.
|
getPriority, getSecurityLevel
void init(byte[] blob, int start, int len) throws SshException
blob
- start
- len
- SshException
String getAlgorithm()
getAlgorithm
in interface SecureComponent
String getSigningAlgorithm()
String getEncodingAlgorithm()
int getBitLength()
byte[] getEncoded() throws SshException
SshException
String getFingerprint() throws SshException
SshException
boolean verifySignature(byte[] signature, byte[] data) throws SshException
signature
- data
- true
if the signature was produced by the corresponding
private key that owns this public key, otherwise false
.SshException
String test()
PublicKey getJCEPublicKey()
Copyright © 2024. All rights reserved.