Members on this page
Meshline.Sdk
Meshline.Models.Protocol
EncryptedPayload Class
Contains an authenticated-encryption algorithm, nonce, and ciphertext.
public sealed record EncryptedPayload : Meshline.Models.Protocol.ProtocolModel, System.IEquatable<Meshline.Models.Protocol.EncryptedPayload>
Inheritance System.Object → ProtocolModel → EncryptedPayload
Implements System.IEquatable<EncryptedPayload>
Properties
EncryptedPayload.Alg Property
The payload encryption algorithm identifier, which must be AES-256-GCM.
public string Alg { get; init; }
Property Value
EncryptedPayload.Ciphertext Property
The encrypted content, including its authentication tag.
public System.Collections.Immutable.ImmutableArray<byte> Ciphertext { get; init; }
Property Value
System.Collections.Immutable.ImmutableArray<System.Byte>
EncryptedPayload.Nonce Property
The 12-byte nonce used by the payload's authenticated-encryption algorithm.
public System.Collections.Immutable.ImmutableArray<byte> Nonce { get; init; }
Property Value
System.Collections.Immutable.ImmutableArray<System.Byte>
Methods
EncryptedPayload.Validate(NetworkContext) Method
Validates the AES-256-GCM algorithm, nonce length, and ciphertext structure.
public override Meshline.Validation.ProtocolViolation? Validate(Meshline.Models.NetworkContext? context=null);
Parameters
context NetworkContext
The optional network context passed to nested validation when needed; field-only validation may ignore it.
Returns
ProtocolViolation
The first detected protocol violation, or null if the implemented checks pass.