This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Jazza's profile picture

Character to Binary

Started by Jazza, 10 July 2012 - 08:30 AM
Jazza #1
Posted 10 July 2012 - 10:30 AM
Hi, I'm still working on my encryption API, and I can't seem to figure out how to turn characters to a binary number, which I can then XOR with the Key. I guess I mean 8 bit ASCII…

Appreciate it if someone could help =D
Pinkishu #2
Posted 10 July 2012 - 02:48 PM
well string.byte should tell you the numbers of the characters

http://lua-users.org/wiki/StringLibraryTutorial
look at the second (s:byte)