public class JcaSingingBackend extends Object implements SigningBackend<KeyPair>
SigningBackend using the Java Cryptography Architecture (JCA).
For signing you need to specify a KeyPair, the PrivateKey is required for the actual signing process,
the PublicKey is required because it gets embedded into the SSH signature.
SigningBackend.SigningResult| Constructor and Description |
|---|
JcaSingingBackend() |
| Modifier and Type | Method and Description |
|---|---|
PublicKey |
extractPublicKey(KeyPair aKeyPair)
Method for extracting the public key from the key information.
|
SigningBackend.SigningResult |
signData(KeyPair aKeyPair,
byte[] someDataToSign)
Method for signing data using the provided key information.
|
public PublicKey extractPublicKey(KeyPair aKeyPair)
SigningBackendThis is required because the public key gets encoded in the SSH signature.
extractPublicKey in interface SigningBackend<KeyPair>aKeyPair - the key informationpublic SigningBackend.SigningResult signData(KeyPair aKeyPair, byte[] someDataToSign) throws SshSignatureException
SigningBackendsignData in interface SigningBackend<KeyPair>aKeyPair - the key informationsomeDataToSign - the blob to be signedSshSignatureException - in case the signing failedCopyright © 2023. All rights reserved.