JsonProperty GetJsonProperty(Type type, JsonProperty mappedProperty, SensitiveDataAttribute attribute)
 {
     return new JsonProperty()
     {
         DeclaringType = type,
         PropertyName = GetEmittedPropertyName(mappedProperty, attribute),
         UnderlyingName = mappedProperty.UnderlyingName,
         PropertyType = typeof(string),
         ValueProvider = new SensitiveDataValueProvider(mappedProperty.UnderlyingName, SaltGenerator),
         Readable = true,
     };
 }
Example #2
0
 JsonProperty GetJsonProperty(Type type, JsonProperty mappedProperty, SensitiveDataAttribute attribute)
 {
     return(new JsonProperty()
     {
         DeclaringType = type,
         PropertyName = GetEmittedPropertyName(mappedProperty, attribute),
         UnderlyingName = mappedProperty.UnderlyingName,
         PropertyType = typeof(string),
         ValueProvider = new SensitiveDataValueProvider(mappedProperty.UnderlyingName, SaltGenerator),
         Readable = true,
     });
 }
 private string GetEmittedPropertyName(JsonProperty originalProperty, SensitiveDataAttribute attribute)
 {
     return attribute.EmittedPropertyName.Clear() ?? $"{originalProperty.PropertyName}_encr";
 }
Example #4
0
 private string GetEmittedPropertyName(JsonProperty originalProperty, SensitiveDataAttribute attribute)
 {
     return(attribute.EmittedPropertyName.Clear() ?? $"{originalProperty.PropertyName}_encr");
 }