I have been trying to make a program in c# to password protect a file so nobody can open the file if it has been encrypted by password. User will encrypt the file with password.
Lets take an example, user encrypted an excel file with password as 123456 using C#. My requirement is when the user open the excel it will popup for the password if user enters the correct password, it will decrypt and show the excel data.
My questions is how the file
What I want to do is that after password protecting the file(excel, pdf,txt etc..), whenever somebody click to open the file, it will ask him for the password. After entering correct password decrypt the files.
Note: I am able to do encryption and decryption in c#, but in this case decryption has to happen at file.