Click here to Skip to main content
15,896,557 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: URL Rewriting using VB.net Pin
wEb GuRu...29-Mar-07 4:13
wEb GuRu...29-Mar-07 4:13 
QuestionEncryption and decryption........... Pin
Member 387988128-Mar-07 22:53
Member 387988128-Mar-07 22:53 
AnswerRe: Encryption and decryption........... Pin
Imran Khan Pathan28-Mar-07 23:00
Imran Khan Pathan28-Mar-07 23:00 
GeneralRe: Encryption and decryption...........(Post The Code) Pin
varshavmane28-Mar-07 23:18
varshavmane28-Mar-07 23:18 
GeneralRe: Encryption and decryption........... Pin
Member 387988128-Mar-07 23:31
Member 387988128-Mar-07 23:31 
AnswerRe: Encryption and decryption........... Pin
www.Developerof.NET28-Mar-07 23:38
www.Developerof.NET28-Mar-07 23:38 
GeneralRe: Encryption and decryption........... Pin
Member 387988129-Mar-07 0:07
Member 387988129-Mar-07 0:07 
AnswerRe: Encryption and decryption........... Pin
Imran Khan Pathan29-Mar-07 0:13
Imran Khan Pathan29-Mar-07 0:13 
using System.Security.Cryptography;<br />
using System.IO;<br />
using System.Text;<br />
<br />
public class dataencryption{<br />
    private Byte[] KEY_64 ={ 42, 16, 93, 156, 78, 4, 218, 32 };<br />
    private Byte[] VAL_64 ={ 55, 103, 246, 79, 36, 99, 167, 3 };<br />
   <br />
	public dataencryption()	{<br />
		//<br />
		// TODO: Add constructor logic here<br />
		//<br />
	}<br />
<br />
    public string Encryption(string value)    {<br />
        DESCryptoServiceProvider CryptoProvider=new DESCryptoServiceProvider();<br />
        MemoryStream ms = new MemoryStream();<br />
        CryptoStream cs = new CryptoStream(ms, CryptoProvider.CreateEncryptor(KEY_64, VAL_64), CryptoStreamMode.Write);<br />
        StreamWriter sw = new StreamWriter(cs);<br />
        sw.Write(value);<br />
        sw.Flush();<br />
        cs.FlushFinalBlock();<br />
        ms.Flush();<br />
        return Convert.ToBase64String(ms.GetBuffer(), 0,Convert.ToInt16(ms.Length));<br />
        //return value;<br />
    }<br />
<br />
    public string Decryption(string value)    {<br />
        DESCryptoServiceProvider CryptoProvider = new DESCryptoServiceProvider();<br />
        Byte[] buffer=Convert.FromBase64String(value);<br />
        MemoryStream ms = new MemoryStream(buffer);<br />
        CryptoStream cs = new CryptoStream(ms, CryptoProvider.CreateDecryptor(KEY_64, VAL_64), CryptoStreamMode.Read);<br />
        StreamReader sr = new StreamReader(cs);<br />
        return sr.ReadToEnd();<br />
    }<br />
}


Best Regards

Pathan





GOD HELP THOSE WHO HELP THEMSELVES

AnswerRe: Encryption and decryption........... Pin
M A A Mehedi Hasan29-Mar-07 1:24
M A A Mehedi Hasan29-Mar-07 1:24 
QuestionASP form code - Bcc and signature file Pin
starri0028-Mar-07 22:38
starri0028-Mar-07 22:38 
QuestionRadioButton not an RadioButtonList Pin
samsonx28-Mar-07 22:26
samsonx28-Mar-07 22:26 
AnswerRe: RadioButton not an RadioButtonList Pin
Sun Rays28-Mar-07 22:38
Sun Rays28-Mar-07 22:38 
AnswerRe: RadioButton not an RadioButtonList Pin
_AK_28-Mar-07 22:38
_AK_28-Mar-07 22:38 
QuestionDropdown binding in client side Pin
NICE TO MEET28-Mar-07 22:07
NICE TO MEET28-Mar-07 22:07 
AnswerRe: Dropdown binding in client side Pin
mikailcetinkaya28-Mar-07 22:14
mikailcetinkaya28-Mar-07 22:14 
GeneralRe: Dropdown binding in client side Pin
NICE TO MEET28-Mar-07 23:51
NICE TO MEET28-Mar-07 23:51 
GeneralRe: Dropdown binding in client side Pin
enjoycrack29-Mar-07 1:16
enjoycrack29-Mar-07 1:16 
AnswerRe: Dropdown binding in client side Pin
_AK_28-Mar-07 22:14
_AK_28-Mar-07 22:14 
Questioncreate pdf file with vector image with .net Pin
bejoy1234528-Mar-07 21:36
bejoy1234528-Mar-07 21:36 
AnswerRe: create pdf file with vector image with .net Pin
mikailcetinkaya28-Mar-07 22:11
mikailcetinkaya28-Mar-07 22:11 
QuestionSystem.Web.HttpRequestValidationException A potentially dangerous Request.Form value was detected from the client (txtareaurl=" &lt;!-- Copied from Gen..."). Pin
iamdking28-Mar-07 21:35
iamdking28-Mar-07 21:35 
AnswerRe: System.Web.HttpRequestValidationException A potentially dangerous Request.Form value was detected from the client (txtareaurl=" &lt;!-- Copied from Gen..."). Pin
mikailcetinkaya28-Mar-07 22:16
mikailcetinkaya28-Mar-07 22:16 
AnswerRe: System.Web.HttpRequestValidationException A potentially dangerous Request.Form value was detected from the client (txtareaurl=" &lt;!-- Copied from Gen..."). Pin
enjoycrack29-Mar-07 1:13
enjoycrack29-Mar-07 1:13 
QuestionAjaxToolKit Pin
Oga M28-Mar-07 21:07
Oga M28-Mar-07 21:07 
Questionhow can we make movable browserless windows like pop ups using java script or anything..... Pin
choorakkuttyil28-Mar-07 21:05
choorakkuttyil28-Mar-07 21:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.