Table of Contents

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
object
PiiPlaintextEncryptionBackfill

Constructors

PiiPlaintextEncryptionBackfill(PortalDbContext, IPiiSymmetricEncryption, IEmailLookupHasher, ILogger<PiiPlaintextEncryptionBackfill>)

public PiiPlaintextEncryptionBackfill(PortalDbContext dbContext, IPiiSymmetricEncryption crypto, IEmailLookupHasher emailLookupHasher, ILogger<PiiPlaintextEncryptionBackfill> logger)

Parameters

dbContext PortalDbContext
crypto IPiiSymmetricEncryption
emailLookupHasher IEmailLookupHasher
logger ILogger<PiiPlaintextEncryptionBackfill>

Methods

ApplyAsync(CancellationToken)

public Task ApplyAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task