Advertisement
Marlingaming

Heimbriech Tablet OS - Encryption Type A

Sep 9th, 2021 (edited)
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. --this cc tweaked program is used to encrypt and decrypt files using a caesars cipher. Arguements Layout: (Key(Used to encrypt and decrypt text)), (text), (TargetFile(set as -1 if you want it to simply return the value))
  2. local tArgs = {...}
  3. local Target = tArgs[3]
  4. local key = tArgs[1]
  5. encrypt(tArgs[2])
  6.  
  7. function encrypt(data)
  8. i=1
  9. enc = ""
  10. repeat
  11. enc = enc..string.char(data:byte(i)+key)
  12. i = i+1
  13. until data:byte(i) == nil
  14. return enc
  15. end
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement