decryptBytes static method
Decifra envelope com key fornecida externamente e retorna os bytes
originais.
Implementation
static List<int> decryptBytes(CryptEnvelope envelope,
{required Uint8List key}) {
final legacy = EncryptedPayload(
algorithm: envelope.algorithm,
ciphertext: envelope.ciphertext,
key: key,
nonce: envelope.nonce,
tag: envelope.tag,
aad: envelope.aad,
);
return CryptUtil.decryptAny(legacy);
}