Hai guys,
I hve a web page that has to send an encrypted value to another page in my asp.net web application… I want to know
- what is the best method to encrypt and decrypt a value using c#?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If by efficient you mean efficient development (not implementing your own solution), I would say using the algorithms in the System.Security.Cryptography namespace. If instead you mean least-CPU-intensive, then probably rot 13 as mentioned by Matt Ellen. (Edit: As others have mentioned, rot 13 is not secure. Please consider that carefully.)
Between DES, 3DES, RC2, and Rijndael, this is what MS has to say: