Configuring encrypted properties in Umbraco UI Builder, the backoffice UI builder for Umbraco.
If needed to collect sensitive information in a collection but don't want to persist in a plain text format to the data storage mechanism. Umbraco UI Builder can help with this by allowing you to define properties as encrypted. After which any time the value is persisted or retrieved from persistence, Umbraco UI Builder will automatically encrypt and decrypt the value.
Umbraco UI Builder uses the
IDataProtectionProviderinstance registered in the DI container to perform its encryption/decryption. If you need to change the encryption algorithm, you should replace the
IDataProtectionProviderinstance in the DI container.
Adds the given property to the encrypted properties collection. Property must be of type
String. When set, the property will be encrypted/decrypted on write/read respectively.
collectionConfig.AddEncryptedProperty(p => p.Secret);