decrypt static method

Uint8List decrypt(
  1. Uint8List encryptedBytes,
  2. Uint8List keyBytes, {
  3. int cryptoWorkers = -1,
  4. int zstdWorkers = -1,
})

Decrypts bytes produced by encrypt.

Implementation

static Uint8List decrypt(
  Uint8List encryptedBytes,
  Uint8List keyBytes, {
  int cryptoWorkers = -1,
  int zstdWorkers = -1,
}) {
  _validateKeyLength(keyBytes, allowEmpty: true);
  final workers = _normalizeWorkers(cryptoWorkers);
  final zstd = _normalizeWorkers(zstdWorkers);
  return ShieldFfi.load().decrypt(
    encryptedBytes,
    keyBytes,
    cryptoWorkers: workers,
    zstdWorkers: zstd,
  );
}