Class SignedMessageExtensions
- Namespace
- Savvyio.Messaging.Cryptography
- Assembly
- Savvyio.Messaging.dll
Extension methods for the ISignedMessage<T> interface.
public static class SignedMessageExtensions
- Inheritance
-
ObjectSignedMessageExtensions
Methods
CheckSignature<T>(ISignedMessage<T>, IMarshaller, Action<SignedMessageOptions>)
Verifies the digital signature of the ISignedMessage<T> message.
public static void CheckSignature<T>(this ISignedMessage<T> message, IMarshaller marshaller, Action<SignedMessageOptions> setup)
where T : IRequest
Parameters
message
ISignedMessage<T>The IRequest message to cryptographically verify.
marshaller
IMarshallerThe IMarshaller that is used when converting the
message
into an ISignedMessage<T>.setup
Action<SignedMessageOptions>The SignedMessageOptions that must be configured.
Type Parameters
T
The type of the payload constraint to the IRequest interface.
Remarks
This method throws an System.ArgumentOutOfRangeException if the verification of the digital signature fails.
Exceptions
- System.ArgumentNullException
message
cannot be null -or-marshaller
cannot be null.- ArgumentException
setup
failed to configure an instance of SignedMessageOptions in a valid state.- System.ArgumentOutOfRangeException
message
signature did not match the cryptographically calculated value.