Advertisement
Guest User

Crypt

a guest
Dec 29th, 2018
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1.             string textToEncrypt = "هنا تضع نص السرفر";
  2.             string encryptedText = "";
  3.             foreach (int x in textToEncrypt)
  4.             {
  5.                 if (x == 128)
  6.                 {
  7.                     encryptedText = encryptedText + Convert.ToChar(x); // \x00
  8.                     continue;
  9.                 }
  10.                 int y = (x + 128) % 256;
  11.                 encryptedText = encryptedText + Convert.ToChar(y);
  12.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement