Main menu:

 

November 2008
M T W T F S S
« Sep    
 12
3456789
10111213141516
17181920212223
24252627282930

Site search

Archives

Categories

Tags

Links:

Tag: c#

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[] [...]