SecurityConfig constructor

const SecurityConfig({
  1. bool enableTLS = false,
  2. String? tlsCertificatePath,
  3. String? tlsPrivateKeyPath,
  4. bool enableKeyRotation = true,
  5. Duration keyRotationInterval = const Duration(days: 30),
  6. int maxAuthAttempts = 3,
  7. bool enableRateLimiting = true,
  8. int maxRequestsPerMinute = 100,
  9. int dhtDifficulty = 0,
  10. bool enableDenylist = false,
  11. String? denylistPath,
  12. String? denylistStoragePath,
  13. Duration denylistRefreshInterval = const Duration(hours: 1),
  14. bool denylistCompactFormat = true,
  15. String denylistDefaultAction = 'block',
})

Creates a new SecurityConfig with default encryption and rotation settings.

Implementation

const SecurityConfig({
  this.enableTLS = false,
  this.tlsCertificatePath,
  this.tlsPrivateKeyPath,
  this.enableKeyRotation = true,
  this.keyRotationInterval = const Duration(days: 30),
  this.maxAuthAttempts = 3,
  this.enableRateLimiting = true,
  this.maxRequestsPerMinute = 100,
  this.dhtDifficulty = 0, // SEC-005: Default disabled
  this.enableDenylist = false,
  this.denylistPath,
  this.denylistStoragePath,
  this.denylistRefreshInterval = const Duration(hours: 1),
  this.denylistCompactFormat = true,
  this.denylistDefaultAction = 'block',
});