hasCorrectLength static method
Checks if the datagram has the correct length for a message.
A message is considered to have the correct length if it is either an
empty signed message (containing only header and signature) or a signed
message with a payload of at least sealLength bytes.
datagram The datagram to check.
Returns true if the datagram has the correct length, false otherwise.
Implementation
static bool hasCorrectLength(Uint8List datagram) =>
datagram.length == emptySignedMessageLength ||
datagram.length > emptySignedMessageLength + sealLength;