Table of Contents

Namespace Savvyio.Messaging.Cryptography

Assembly: Savvyio.Core.dll

Messages traveling through a broker can be tampered with. The Savvyio.Messaging.Cryptography namespace protects command and event message integrity by attaching cryptographic signatures through SignedMessage<T>, regardless of transport.

Start with MessageExtensions.Sign<T> to add an HMAC or asymmetric signature to any IMessage<T>, producing a SignedMessage<T>. On the consumer side, call SignedMessageExtensions.CheckSignature<T> to verify authenticity before dispatching. Choose this namespace when messages travel through untrusted infrastructure and you need proof that the payload has not been altered; for cloud-native message signing without cryptographic overhead, broker-level security policies may be sufficient. For CloudEvents-specific signing, see Savvyio.EventDriven.Messaging.CloudEvents.Cryptography.

Availability: .NET 10 and .NET 9

Extension Members

Type Ext Methods
IMessage ⬇️ Sign<T>
ISignedMessage ⬇️ CheckSignature<T>

Classes

MessageExtensions

Extension methods for the IMessage<T> interface.

SignedMessageExtensions

Extension methods for the ISignedMessage<T> interface.

SignedMessageOptions

Configuration options that is related to wrapping an IRequest implementation inside a cryptographically signed message.

SignedMessage<T>

Provides a default implementation of the ISignedMessage<T> interface.

Interfaces

ISignedMessage<T>

Defines a generic way to wrap an IRequest inside a cryptographically signed message.