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
messageISignedMessage<T>The IRequest message to cryptographically verify.
marshallerIMarshallerThe IMarshaller that is used when converting the
messageinto an ISignedMessage<T>.setupAction<SignedMessageOptions>The SignedMessageOptions that must be configured.
Type Parameters
TThe type of the payload constraint to the IRequest interface.
Remarks
This method throws an ArgumentOutOfRangeException if the verification of the digital signature fails.
Exceptions
- ArgumentNullException
messagecannot be null -or-marshallercannot be null.- ArgumentException
setupfailed to configure an instance of SignedMessageOptions in a valid state.- ArgumentOutOfRangeException
messagesignature did not match the cryptographically calculated value.