Main menu:

 

July 2008
M T W T F S S
« Jun   Aug »
 123456
78910111213
14151617181920
21222324252627
28293031  

Site search

Archives

Categories

Tags

Links:

Archive for July 7th, 2008

asp.net encrypting querystring in the URL

I didnt find a c# version to encrypt query strings in the url, please find the same below..
use System.Security.Cryptography;
System.IO;
System.Text; name spaces
public class QueryStringEncryption
{
byte[] key = { };
byte[] IV = { 0×12, 0×34, 0×56, 0×78, 0×90, 0xAB,0xCD, 0xEF};
public QueryStringEncryption()
{
//
// TODO: Add constructor logic here
//
}
public string Encrypt(string stringToEncrypt, string SEncryptionKey)
{
try
{
key = System.Text.Encoding.UTF8.GetBytes(SEncryptionKey.Substring(0, 8));
DESCryptoServiceProvider des = new DESCryptoServiceProvider();
byte[] [...]