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
encryptedEntryEncryptedAuditEntryThe encrypted audit entry to decrypt.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<AuditEvent>
The decrypted audit event.
Exceptions
- ArgumentNullException
Thrown when
encryptedEntryis null.
EncryptAsync(AuditEvent, CancellationToken)
Encrypts the specified audit entry fields before storage.
Task<EncryptedAuditEntry> EncryptAsync(AuditEvent entry, CancellationToken cancellationToken)
Parameters
entryAuditEventThe audit entry to encrypt.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<EncryptedAuditEntry>
The encrypted audit entry.
Exceptions
- ArgumentNullException
Thrown when
entryis null.