encryptSecretBytes method
Encrypts bytes with the given symmetric secret key and returns the raw ciphertext bytes.
Implementation
Future<List<int>> encryptSecretBytes(
SecretKey key,
List<int> bytes, {
List<int>? aad,
}) async {
final secretBox = await _cipher.encrypt(
bytes,
secretKey: key,
aad: aad ?? const [],
);
return secretBox.concatenation();
}