Really not having a good week with encryption. Let me explain what I need.
- I want to encrypt string values to a file….
- I want to decrypt the file contents back to a string using C#
- I want to do this without having to worry about machine store or user store or any other store, neither a registry , etc.
- Any security key can be shipped in my application.
security doesn’t have to be remarkably strong, and my code is obfuscated.
I just want a solution that is portable. I’ve tried RSA and it got me nowhere fast after finding out that in production a certain key file is missing, something I know nothing about and can’t locate it on the dev machine.
Please help.
Here is some code that I use quite a bit (adapted it from source on the web) which relies solely on a passphrase stored in web.config/app.config under setttings. It uses triple des.
The original source was here: http://www.dijksterhuis.org/encrypting-decrypting-string/