In C# I want to send sensitive data to a file to be stored in an encrypted form. Later I want to be able to decrypt the file.
I'm thinking of using private/public key encryption, since if I just used simple key encryption, someone could probably find the key in the compiled executable.
Looking for a simple example demonstrating how to do this:
1. Make Public/Private key pair
2. Simple C# program that uses Public Key to encrypt lines of text sent to file. (Resulting file probably a binary file, not a text file.)
3. Another simple program that decrypts file using private key