Educational Materials like Computer, engineering, software and Property , Entertainment: C# code for encription and decription of password or text
Custom Search

Subscribe Now: Feed Icon

February 16, 2012

C# code for encription and decription of password or text

C# code of encription and decription

following are two functions. one for encryption and second for decryption. textbox3 is text box to input data and textbox4 is textbox shows encrypted data.

private void encrypt()
{
int i = 0; string result = "";
string old = textBox3.Text;
do
{
result = result + Convert.ToChar(Convert.ToInt32(old) + (i + 2));
i = i + 1;
} while (i < old.Length);
textBox4.Text = result;
textBox3.Text ="";
}
private void decrypt()
{
int i = 0; string result = "";
string old = textBox4.Text;
do
{
result = result + Convert.ToChar(Convert.ToInt32(old) - (i + 2));
i = i + 1;
} while (i < old.Length);
textBox3.Text = result;
textBox4,Text="";
}

0 comments:

Post a Comment

Follow by Email

Video Bar

Loading...

Followers

Educational Materials like Computer, engineering, software and Property , Entertainment

Recent Visitors

Active Search Results
Wink Bingo | Slots Tips | Football manager 2010 | blackjack free | Poker Stars
Submitdomainname.com