public string EncryptDecrypt(string textToEncrypt, int encryptionKey)
{
StringBuilder inSb = new StringBuilder(textToEncrypt);
StringBuilder outSb = new StringBuilder(textToEncrypt.Length);
char c;
for (int i = 0; i < textToEncrypt.Length; i++)
{
c = inSb[i];
c = (char)(c ^ encryptionKey);
outSb.Append(c);
}
return outSb.ToString();
}
No comments:
Post a Comment