加密C#.net中的查询字符串

abh*_*jit 4 c# asp.net

string emailfield=txtEmail.Text.ToString();
string url = 
   "http://localhost:3076/user/Authenticate-Users.aspx?email="+emailfield;
Run Code Online (Sandbox Code Playgroud)

我想加密查询字符串,然后decrpyt.有没有办法在C#中做到这一点?

谢谢

Jon*_*ood 7

您可以将名称/值集合加密为字符串,然后将该加密字符串作为单个查询参数传递.

我在一篇文章Encrypting Query Arguments中演示了这种技术.