Encrypt Decrypt Data in Umbraco Back Office
In May 2018, the General Data Protection Regulation (GDPR) came into effect.
It has wide-reaching implications for how business handle customers information.
In this blog, I will show you how you can protect user data by encrypting the data you hold on your customers.
Encrypting data allows you to store information in a database. If the data is compromised, the attacker will not be able to see the information stored in a readable format.
So, in this example, if a visitor visits your site and completes a form entering their details, you need to ensure its security.
The code below shows how to capture the saving event in Umbraco.
Encrypt Submitted data
We can now encrypt the data submitted before storing it in Umbraco as shown below.
Now when we are in the back office we need to decrypt the data so that we can read it as shown below.
You can see in the images below, how we can view the decrypted data, but once saved the data is encrypted.
In this short post, I have shown how you can encrypt and decrypt data in Umbraco back office and thus helping to protect user data from prying eyes.