encryptBuffer static method

void encryptBuffer(
  1. Uint8List bytes,
  2. List<int> key, [
  3. int recordIndex = 0
])

Encrypts, in place, the (encrypted) fields of a Record buffer with field-encryption format 3 (key: 32 bytes; recordIndex: unique per buffer under the key). Throws ArgumentError, before any byte changes, for a bad key or a malformed buffer.

Implementation

static void encryptBuffer(Uint8List bytes, List<int> key, [int recordIndex = 0]) =>
    _FlatbuffersEncryption.cryptBuffer(
        bytes, key, recordIndex, _flatbuffersEncryptionProgram);