EncryptionConfig constructor

const EncryptionConfig({
  1. required bool enabled,
  2. required List<int> key,
  3. EncryptionAlgorithm algorithm = EncryptionAlgorithm.aes256GCM,
  4. bool encryptFieldNames = false,
  5. bool compressBeforeEncryption = true,
})

Implementation

const EncryptionConfig({
  required this.enabled,
  required this.key,
  this.algorithm = EncryptionAlgorithm.aes256GCM,
  this.encryptFieldNames = false,
  this.compressBeforeEncryption = true,
}) : assert(
        !enabled || key.length == 32,
        'Encryption key must be exactly 32 bytes (256 bits)',
      );