15 lines
358 B
C#
15 lines
358 B
C#
namespace MxGateway.Client.Cli;
|
|
|
|
internal static class MxGatewayCliSecretRedactor
|
|
{
|
|
public static string Redact(string value, string? apiKey)
|
|
{
|
|
if (string.IsNullOrEmpty(value) || string.IsNullOrEmpty(apiKey))
|
|
{
|
|
return value;
|
|
}
|
|
|
|
return value.Replace(apiKey, "[redacted]", StringComparison.Ordinal);
|
|
}
|
|
}
|