Interface IComplianceEncryptionBuilder
- Namespace
- Excalibur.Compliance
- Assembly
- Excalibur.Compliance.dll
Configures compliance encryption services (AES-256-GCM by default) in a fluent, composable way,
following the IDataProtectionBuilder idiom. Obtain an instance via
services.AddComplianceEncryption(builder => ...).
public interface IComplianceEncryptionBuilder
Remarks
FIPS validation services are always registered. A default in-memory key-management provider and the
AES-256-GCM encryption provider are registered unless overridden by the corresponding With* call.
Properties
Services
Gets the underlying service collection so additional services can be registered against the same container.
IServiceCollection Services { get; }
Property Value
- IServiceCollection
The service collection being configured.
Methods
WithEncryption(Action<AesGcmEncryptionOptions>?)
Configures the AES-256-GCM encryption provider. When omitted, the provider is registered with default options.
IComplianceEncryptionBuilder WithEncryption(Action<AesGcmEncryptionOptions>? configure = null)
Parameters
configureAction<AesGcmEncryptionOptions>Optional configuration for the AES-256-GCM encryption options.
Returns
- IComplianceEncryptionBuilder
The same builder instance for chaining.
WithInMemoryKeyManagement(Action<InMemoryKeyManagementOptions>?)
Uses the in-memory key-management provider (suitable for development and testing). This is the default when no key-management provider is selected; calling it explicitly lets you configure its options.
IComplianceEncryptionBuilder WithInMemoryKeyManagement(Action<InMemoryKeyManagementOptions>? configure = null)
Parameters
configureAction<InMemoryKeyManagementOptions>Optional configuration for the in-memory key-management options.
Returns
- IComplianceEncryptionBuilder
The same builder instance for chaining.
WithKeyManagement<TKeyManagement>()
Uses a custom key-management provider (for example a cloud KMS). Mutually exclusive with WithInMemoryKeyManagement(Action<InMemoryKeyManagementOptions>?).
IComplianceEncryptionBuilder WithKeyManagement<TKeyManagement>() where TKeyManagement : class, IKeyManagementProvider
Returns
- IComplianceEncryptionBuilder
The same builder instance for chaining.
Type Parameters
TKeyManagementThe key-management provider implementation type.
WithKeyRotation(Action<RotatingEncryptionOptions>?)
Enables key rotation, wrapping the encryption provider so encrypted data is transparently re-encrypted under the current key version.
IComplianceEncryptionBuilder WithKeyRotation(Action<RotatingEncryptionOptions>? configure = null)
Parameters
configureAction<RotatingEncryptionOptions>Optional configuration for the rotating-encryption options.
Returns
- IComplianceEncryptionBuilder
The same builder instance for chaining.