Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static string Encrypt(string text, int key)
- {
- int result = 0;
- byte[] bytes = Encoding.ASCII.GetBytes(text);
- char chara;
- foreach (var item in bytes)
- {
- Console.WriteLine(System.Convert.ToInt32(item));
- result = System.Convert.ToInt32(item) + key;
- chara = (char)result;
- text += chara.ToString();
- }
- return text;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement