C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |



My Profile

Gifts

Active Members
TodayLast 7 Days more...







Decryption also help me


Posted Date: 25 Jul 2008      Total Responses: 1

Posted By: saritha       Member Level: Gold     Points: 1


hi friends with u r help i completed the encrypt.
but now i have to decrypt the values..
so help me pls...
how to decrypt .valuies rstord in sql. username,pwd
in .cs file how to decrypt




Responses

Author: Gaddamchandrakanth    26 Jul 2008Member Level: SilverRating:     Points: 6
Hi,
Pls check with this once. this is for password encryption and decryption .

#region
public static string Encrypt( string strHastobeEncryptWord)
{
byte[] sByBuf = Encoding.ASCII.GetBytes(strHastobeEncryptWord);
for (int nCtr = 0; nCtr < sByBuf.Length; nCtr++)
sByBuf[nCtr] = Convert.ToByte(Convert.ToInt64(sByBuf[nCtr]) + 4);
string strEncryptedWord = Encoding.ASCII.GetString(sByBuf);
return strEncryptedWord;
}

#endregion Encryption Method

#region Decryption Method
public static string Decrypt(string strPassword)
{
byte[] sByBuf = Encoding.ASCII.GetBytes(strPassword);
for (int nCtr = 0; nCtr < sByBuf.Length; nCtr++)
sByBuf[nCtr] = Convert.ToByte(Convert.ToInt64(sByBuf[nCtr]) - 4);
string strDecrptedword = Encoding.ASCII.GetString(sByBuf);
return strDecrptedword;
}


Thanks and Regards
Chandrakanth



Post Reply
You must Sign In to post a response.
Next : how to download RJS calender control
Previous : What are the Different layers in ADO.Net?
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

audio conferencing services

Contact Us    Privacy Policy    Terms Of Use