Members on this page
Meshline.Sdk
Meshline.Models.Protocol
MessageKeyBox Class
Contains a message key encrypted to one device using HPKE.
public sealed record MessageKeyBox : Meshline.Models.Protocol.ProtocolModel, System.IEquatable<Meshline.Models.Protocol.MessageKeyBox>
Inheritance System.Object → ProtocolModel → MessageKeyBox
Implements System.IEquatable<MessageKeyBox>
Properties
MessageKeyBox.Alg Property
The HPKE suite identifier X25519-HKDF-SHA256-AES256GCM.
public string Alg { get; init; }
Property Value
MessageKeyBox.DeviceId Property
The device's canonical dev_ identifier.
public string DeviceId { get; init; }
Property Value
MessageKeyBox.Enc Property
The 32-byte HPKE encapsulated X25519 public key.
public System.Collections.Immutable.ImmutableArray<byte> Enc { get; init; }
Property Value
System.Collections.Immutable.ImmutableArray<System.Byte>
MessageKeyBox.SealedKey Property
The message key encrypted with HPKE for the target device.
public System.Collections.Immutable.ImmutableArray<byte> SealedKey { get; init; }
Property Value
System.Collections.Immutable.ImmutableArray<System.Byte>
Methods
MessageKeyBox.Validate(NetworkContext) Method
Validates the device identifier, HPKE suite, encapsulated key, and encrypted message-key size.
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.