Pages

Men

rh

6/17/2012

Encrypt Password in C#

 public static string Encrypt( string strEncryptWord)
 {
     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;
}

No comments :

Post a Comment