decryptFileImplementation function

Future<Uint8List?> decryptFileImplementation(
  1. EncryptedFile input
)

you would likely want to use NativeImplementations and Client.nativeImplementations instead

Implementation

Future<Uint8List?> decryptFileImplementation(EncryptedFile input) async {
  if (base64.encode(await sha256(input.data)) !=
      base64.normalize(input.sha256)) {
    return null;
  }

  final key = base64decodeUnpadded(base64.normalize(input.k));
  final iv = base64decodeUnpadded(base64.normalize(input.iv));
  return await aesCtr.encrypt(input.data, key, iv);
}