Advertisement
DubSlime

API/Crypt

Jul 16th, 2014
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. function crypter(word, fichier)
  2. string.gsub(word, "a", "z")
  3. string.gsub(word, "b", "y")
  4. string.gsub(word, "c", "x")
  5. string.gsub(word, "d", "w")
  6. string.gsub(word, "e", "v")
  7. string.gsub(word, "f", "u")
  8. string.gsub(word, "g", "t")
  9. string.gsub(word, "h", "s")
  10. string.gsub(word, "i", "r")
  11. string.gsub(word, "j", "q")
  12. string.gsub(word, "k", "p")
  13. string.gsub(word, "l", "o")
  14. string.gsub(word, "m", "n")
  15. string.gsub(word, "n", "m")
  16. string.gsub(word, "o", "l")
  17. string.gsub(word, "p", "k")
  18. string.gsub(word, "q", "j")
  19. string.gsub(word, "r", "i")
  20. string.gsub(word, "s", "h")
  21. string.gsub(word, "t", "g")
  22. string.gsub(word, "u", "f")
  23. string.gsub(word, "v", "e")
  24. string.gsub(word, "w", "d")
  25. string.gsub(word, "x", "c")
  26. string.gsub(word, "y", "b")
  27. string.gsub(word, "z", "a")
  28. string.reverse(word)
  29. fc = fs.open(fichier, "w")
  30. fc.writeLine(word)
  31. fc.close()
  32. end
  33.  
  34. function decrypter(word)
  35. string.gsub(word, "a", "z")
  36. string.gsub(word, "b", "y")
  37. string.gsub(word, "c", "x")
  38. string.gsub(word, "d", "w")
  39. string.gsub(word, "e", "v")
  40. string.gsub(word, "f", "u")
  41. string.gsub(word, "g", "t")
  42. string.gsub(word, "h", "s")
  43. string.gsub(word, "i", "r")
  44. string.gsub(word, "j", "q")
  45. string.gsub(word, "k", "p")
  46. string.gsub(word, "l", "o")
  47. string.gsub(word, "m", "n")
  48. string.gsub(word, "n", "m")
  49. string.gsub(word, "o", "l")
  50. string.gsub(word, "p", "k")
  51. string.gsub(word, "q", "j")
  52. string.gsub(word, "r", "i")
  53. string.gsub(word, "s", "h")
  54. string.gsub(word, "t", "g")
  55. string.gsub(word, "u", "f")
  56. string.gsub(word, "v", "e")
  57. string.gsub(word, "w", "d")
  58. string.gsub(word, "x", "c")
  59. string.gsub(word, "y", "b")
  60. string.gsub(word, "z", "a")
  61. string.reverse(word)
  62. print(word)
  63. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement