0

Building a .Net 6 web app and storing data in On-Prem database. I collect some sensitive data that needs to be stored in the database in a format that is not easily readable. I also need to retrieve that data and display it in my application.

Security is not really an issue, I just want to make sure someone browsing the database cant read the data. So a simple encrypt/decrypt.

I want to use a single key for Encrypt/Decrypt that will be stored in the web.config file. The application is used by multiple people in the organization and they all need to be able to read/write/edit the sensitive data.

I have looked at a few examples in the MSDN docs and they all seem like overkill for my scenario. What would you suggest?

  • Sounds like you need symmetric encryption (same key is used to encrypt and decrypt). AES is the gold standard for symmetric encryption. See https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.aes?view=net-6.0 for more info. – mti2935 Nov 02 '23 at 16:32
  • 1
    " sensitive data ... Security is not really an issue" - then this question is obviously off-topic here :) And either the data are not sensitive as you claim or security should be actually an issue. Apart from that, you are specifically asking for code and not algorithms, so stackoverflow.com is the appropriate site. " they all seem like overkill for my scenario" - it is unclear what exactly you've looked at and why did you consider it overkill. – Steffen Ullrich Nov 02 '23 at 16:45

0 Answers0