Class PiiPlaintextEncryptionBackfill
- Namespace
- SEBT.Portal.Infrastructure.Services
- Assembly
- SEBT.Portal.Infrastructure.dll
Migrates plaintext-at-rest (or ciphertext lacking the email MAC column) into authenticated AES-GCM envelopes. Executes after EF migrations — idempotent skips rows that already have coherent ciphertext.
public sealed class PiiPlaintextEncryptionBackfill
- Inheritance
-
objectPiiPlaintextEncryptionBackfill
Constructors
PiiPlaintextEncryptionBackfill(PortalDbContext, IPiiSymmetricEncryption, IEmailLookupHasher, ILogger<PiiPlaintextEncryptionBackfill>)
public PiiPlaintextEncryptionBackfill(PortalDbContext dbContext, IPiiSymmetricEncryption crypto, IEmailLookupHasher emailLookupHasher, ILogger<PiiPlaintextEncryptionBackfill> logger)
Parameters
dbContextPortalDbContextcryptoIPiiSymmetricEncryptionemailLookupHasherIEmailLookupHasherloggerILogger<PiiPlaintextEncryptionBackfill>
Methods
ApplyAsync(CancellationToken)
public Task ApplyAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
- Task