Exemplo n.º 1
0
        private KeyValuePair <string, object> SanitizeAsBytes(string key, Payload payload)
        {
            var value = payload.GetString();

            value = CreditcardMask.Mask(value);
            var newPayload = new Payload(value, payload.Encoding);

            return(new KeyValuePair <string, object>(key, newPayload));
        }
Exemplo n.º 2
0
        private KeyValuePair <string, object> SanitizeAsMap(string field, Map dictionary)
        {
            var map = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase);

            foreach (var key in dictionary?.Value.Keys)
            {
                map[key] = CreditcardMask.Mask(dictionary?.Value?[key]);
            }
            return(new KeyValuePair <string, object>(field, new Map(map, dictionary.Format)));
        }
Exemplo n.º 3
0
 private KeyValuePair <string, object> SanitizeAsString(string key, string value)
 {
     return(new KeyValuePair <string, object>(key, CreditcardMask.Mask(value)));
 }