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

Base64 API

Started by minebuild02, 28 March 2015 - 02:14 PM
minebuild02 #1
Posted 28 March 2015 - 03:14 PM
This is just a simple implementation of Base64 encoding/decoding in ComputerCraft.
Really, not my work, taken from a web site. I just ported it to CC.

Download: pastebin get QYvNKrXE Base64
Mackan90096 #2
Posted 30 March 2015 - 11:25 AM
The encoding works, but not the decoding.
minebuild02 #3
Posted 31 March 2015 - 08:08 AM
When I tested this API, both the encoding and decoding worked. Here is a sample encoder/decoder.


print("Encoding word \"try\"")
os.loadAPI("/Base64") --Make sure you download it as /Base64
print("Result is: "..Base64.encode("try"))
write("Now write it down: ")
local input = read()
print("Decoded as "..Base64.decode(input))
Edited on 31 March 2015 - 06:15 AM
Rougeminner #4
Posted 04 April 2015 - 05:32 AM
The last on of these i used failed for the purpose i used it for. I will definitely use your code tomorrow.