decryptSecret method
Decrypts a message with the given symmetric secret key.
Implementation
Future<String> decryptSecret(
SecretKey secretKey,
String ciphertext, {
List<int> aad = const [],
}) async {
final secretBox = SecretBox.fromConcatenation(
base64Decode(ciphertext),
nonceLength: _nonceLength,
macLength: _macLength,
);
return utf8.decode(
await _cipher.decrypt(secretBox, secretKey: secretKey, aad: aad),
);
}