Table of Contents

Class EncryptionOptions

Namespace
Excalibur.Compliance.Configuration
Assembly
Excalibur.Compliance.dll

General encryption configuration options.

public sealed class EncryptionOptions
Inheritance
EncryptionOptions
Inherited Members

Properties

DefaultPurpose

Gets or sets the default key purpose when not specified in the encryption context.

[Required]
public string DefaultPurpose { get; set; }

Property Value

string

Remarks

Used for key selection when Purpose is not specified. Common purposes include "field-encryption", "document-encryption", "api-key-encryption".

EncryptionAgeWarningThreshold

Gets or sets the maximum age of encrypted data before warnings are logged.

public TimeSpan? EncryptionAgeWarningThreshold { get; set; }

Property Value

TimeSpan?

Remarks

When set, a warning is logged during decryption if the data was encrypted longer ago than this threshold. Helps identify data that needs re-encryption after key rotation.

IncludeTimingMetadata

Gets or sets a value indicating whether to include timing metadata in encrypted data.

public bool IncludeTimingMetadata { get; set; }

Property Value

bool

Remarks

When true (default), encrypted data includes the timestamp when encryption occurred. This is useful for auditing and key rotation tracking.

LazyMigrationEnabled

Gets or sets a value indicating whether lazy migration is enabled.

public bool LazyMigrationEnabled { get; set; }

Property Value

bool

Remarks

When enabled, plaintext data is encrypted opportunistically during normal read/write operations based on LazyMigrationMode.

This enables gradual migration without requiring dedicated batch processing.

LazyMigrationMode

Gets or sets when lazy migration encrypts plaintext data.

public LazyMigrationMode LazyMigrationMode { get; set; }

Property Value

LazyMigrationMode

Remarks

Only used when LazyMigrationEnabled is true. Default is Both for fastest migration.

Use OnRead for read-heavy workloads, or OnWrite to avoid extra write operations on reads.

Mode

Gets or sets the encryption mode for field-level encryption operations.

public EncryptionMode Mode { get; set; }

Property Value

EncryptionMode

Remarks

This property controls the encryption behavior during migration phases. The default is EncryptAndDecrypt for normal operation.

See EncryptionMode for available modes and their use cases.

RequireFipsCompliance

Gets or sets a value indicating whether FIPS 140-2 compliance is required by default.

public bool RequireFipsCompliance { get; set; }

Property Value

bool

Remarks

When true, encryption operations will fail if the provider or key is not FIPS 140-2 compliant, unless overridden in the encryption context.