Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --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))
- local tArgs = {...}
- local Target = tArgs[3]
- local key = tArgs[1]
- encrypt(tArgs[2])
- function encrypt(data)
- i=1
- enc = ""
- repeat
- enc = enc..string.char(data:byte(i)+key)
- i = i+1
- until data:byte(i) == nil
- return enc
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement