Table of Contents

Interface IAuditLogEncryptor

Namespace
Excalibur.Compliance
Assembly
Excalibur.Compliance.Abstractions.dll

Provides encryption and decryption of audit log entries at rest.

public interface IAuditLogEncryptor

Remarks

This service encrypts sensitive fields within audit entries before storage and decrypts them on retrieval. It uses the existing IKeyManagementProvider infrastructure for key access and supports field-level encryption granularity.

Methods

DecryptAsync(EncryptedAuditEntry, CancellationToken)

Decrypts an encrypted audit entry for reading.

Task<AuditEvent> DecryptAsync(EncryptedAuditEntry encryptedEntry, CancellationToken cancellationToken)

Parameters

encryptedEntry EncryptedAuditEntry

The encrypted audit entry to decrypt.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<AuditEvent>

The decrypted audit event.

Exceptions

ArgumentNullException

Thrown when encryptedEntry is null.

EncryptAsync(AuditEvent, CancellationToken)

Encrypts the specified audit entry fields before storage.

Task<EncryptedAuditEntry> EncryptAsync(AuditEvent entry, CancellationToken cancellationToken)

Parameters

entry AuditEvent

The audit entry to encrypt.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<EncryptedAuditEntry>

The encrypted audit entry.

Exceptions

ArgumentNullException

Thrown when entry is null.