How can I encrypt a querystring in asp.net?

Posted by Dave Haynes on Stack Overflow See other posts from Stack Overflow or by Dave Haynes
Published on 2008-10-27T17:22:34Z Indexed on 2014/06/03 9:25 UTC
Read the original article Hit count: 170

Filed under:
|

I need to encrypt and decrypt a querystring in ASP.NET.

The querystring might look something like this:

http://www.mysite.com/report.aspx?id=12345&year=2008

How do I go about encrypting the entire querystring so that it looks something like the following?

http://www.mysite.com/report.aspx?crypt=asldjfaf32as98df8a

And then, of course, how to I decrypt it? What's the best encryption to use for something like this? TripleDES?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about encryption