2using Microsoft.Extensions.Logging;
30 : base(context, loggerFactory) {}
33 public override void EncodePayload(
byte[] payload, Span<byte> destination)
42 public override ReadOnlySpan<byte>
GenerateMac(ReadOnlySpan<byte> message,
bool isIncoming) =>
ACUMessageSecureChannel(ILoggerFactory loggerFactory)
Initializes a new instance of the ACUMessageChannel with logger factory.
override ReadOnlySpan< byte > GenerateMac(ReadOnlySpan< byte > message, bool isIncoming)
Generates a new Message Authentication Code.Note this command IS NOT idempotent as every time it is c...
override void EncodePayload(byte[] payload, Span< byte > destination)
Encrypts the payload using the secure channel context.This function can only be called once IsSecurit...
override byte[] DecodePayload(byte[] payload)
Decodes the payload using the secure channel context.This function can only be called once IsSecurity...
byte[] GenerateCommandMac(ReadOnlySpan< byte > message)
Generates a MAC for a command message.
byte[] GenerateReplyMac(ReadOnlySpan< byte > message)
Generates a MAC for a reply message.
MessageSecureChannel(SecurityContext context=null, ILoggerFactory loggerFactory=null)
Initializes a new instance of MessageSecureChannel class.
SecurityContext Context
Security state used by the channel.
Security context used within MessageSecureChannel.