decrypt method
Decrypts data using ChaCha20.
Implementation
@override
List<int> decrypt(List<int> data) {
final keyBytes = KeyEncodingUtils.stringKeyToBytes(key);
final params = ParametersWithIV(KeyParameter(keyBytes), nonce);
final cipher = ChaCha20Engine();
cipher.init(false, params);
return cipher.process(Uint8List.fromList(data));
}