constructPayload function
Implementation
String constructPayload(Uint8List nonce, Uint8List ciphertext, Uint8List mac) {
Uint8List payloadBytes = Uint8List.fromList([
0x02, // Version
...nonce,
...ciphertext,
...mac,
]);
return base64.encode(payloadBytes);
}