Advertisement
Guest User

Untitled

a guest
Oct 18th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. static string FuncS(string text, string password)
  2. {
  3. string s = "";
  4. for (int i = 0; i < text.Length; i++)
  5. {
  6. int Count = 0;
  7. s += (char)(text[i] ^ password[Count]);
  8. Count++;
  9. if (Count == password.Length) Count = 0;
  10. }
  11. return s;
  12. }
  13. static string Func(string text,string password)
  14. {
  15. StringBuilder sb = new StringBuilder(text);
  16. for(int i = 0; i < sb.Length; i++)
  17. {
  18. int Count = 0;
  19. sb[i] = (char)(sb[i] ^ password[Count]);
  20. Count++;
  21. if (Count == password.Length) Count = 0;
  22. }
  23. return sb.ToString();
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement