I want to encrypt a string and save it to disk in an encrpyted format. To do this I’ll have to place the shared secret somewhere in source code. How easy is it for the user to then extract this when the program is running?
It’s not the end of the world if they do but I’d prefer it if they can’t see this string.
I’m using c# .net
I want to encrypt a string and save it to disk in an encrpyted
Share
Its Child’s Play.Have you heard about Reflector.Its a Software that reads the ILCode and generates the source code.Getting the secret from the source code is like a walk in the park.
You can use the following security measures
Obfuscating your code with String Encryption
Adding a custom installer action to store the secret encrypted using system specific key(DPAPI) in the app.config file
Any method whatever be it, is not 100% crack proof.If you give the Executable publicly it can be reversed