Class SignatureSigner
- java.lang.Object
-
- com.oracle.bmc.http.signing.internal.SignatureSigner
-
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 Summary
Constructors Constructor Description SignatureSigner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
sign(RSAPrivateKey privateKey, byte[] message, String algorithm)
Sign the given message using the given private key
-
-
-
Method Detail
-
sign
@Nonnull public byte[] sign(@Nonnull RSAPrivateKey privateKey, @Nonnull byte[] message, @Nonnull String algorithm)
Sign the given message using the given private key- Parameters:
privateKey
- the private key to use to sign the messagemessage
- the message to sign, must not be null or emptyalgorithm
- the algorithm to sign- Returns:
- an RSA signature of the message made using given private key and algorithm
- Throws:
SignedRequestException
- if algorithm is invalid, key is invalid or signing fails
-
-