AlignedTextWriterTraceListener ShieldSensitiveData Property CleanCode C# Libraries v1.2.03 API
Gets or sets a regular expression to identify sensitive data for masking.

Namespace: CleanCode.Diagnostics
Assembly: CleanCode (in CleanCode.dll) Version: (1.2.03)

public static string ShieldSensitiveData { get; set; }

Field Value

A regular expression with which to isolate sensitive data.

The supplied selector must be a regular expression containing one subgroup. This subgroup isolates the text to mask with asterisks. Example: The regular expression "Password=([^;]+)" will select the literal "Password=" followed by any non-empty string up to the next semicolon. Whenever the regular expression is matched, it will substitute "Password=***". The current implementation allows for only one string to match; should expand this in the future to allow multiple values. The default is Password=([^;]+).
See Also