public class SignatureSigner extends Object
The SignatureSigner is used to actually sign a message with a private key. This version is specific to RSA.
Class is immutable. @Immutable
Constructor and Description |
---|
SignatureSigner() |
Modifier and Type | Method and Description |
---|---|
byte[] |
sign(RSAPrivateKey privateKey,
byte[] message,
String algorithm)
Sign the given message using the given private key
|
@Nonnull public byte[] sign(@Nonnull RSAPrivateKey privateKey, @Nonnull byte[] message, @Nonnull String algorithm)
Sign the given message using the given private key
privateKey
- the private key to use to sign the messagemessage
- the message to sign, must not be null or emptyalgorithm
- the algorithm to signSignedRequestException
- if algorithm is invalid, key is invalid or signing failsCopyright © 2016–2024. All rights reserved.