HI ALL,
i want to create own algorithm for Encrypt & Decrypt like as TripleDes,blow fish algorithm.
Please Help me.
Thanx & regards
MsHema
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Niradhip ChakrabortyPosted Sep 21, 2009, 1:36 AM
Encryption:
public string EncryptString(string strInput)
{
int i = 0;
string strTemp = null;
for (i = 0; i <= strInput.Length - 1; i++)
{
int charValue = Convert.ToInt32(strInput[i]); // converting in ascii
charValue ^= 30;
strTemp += char.ConvertFromUtf32(charValue);
}
return strTemp;
}
Decryption:
public string DecryptString(string strInput)
{
int i = 0;
string strTemp = null;
for (i = 0; i <= strInput.Length - 1; i++)
{
int charValue = Convert.ToInt32(strInput[i]); // converting in ascii
charValue ^= 30;
strTemp += char.ConvertFromUtf32(charValue);
}
return strTemp;
}