Difference between revisions of "Kuey"
Line 1: | Line 1: | ||
{{#set:LOVE Version=Any}} | {{#set:LOVE Version=Any}} | ||
− | {{#set:Description=Kuey is a library that encode/decode strings and files.}} | + | {{#set:Description=Kuey is a library that encode/decode strings and files with a key.}} |
That simple library encode and decode files with a key. | That simple library encode and decode files with a key. | ||
Line 25: | Line 25: | ||
Kuey.decodeFile(filename, key[, outputname]) -- Return a string and write a file if outputname is defined. | Kuey.decodeFile(filename, key[, outputname]) -- Return a string and write a file if outputname is defined. | ||
− | [https://love2d.org/forums/viewtopic.php?f=5&t=81643 Forum post here!] | + | [https://love2d.org/forums/viewtopic.php?f=5&t=81643 **Forum post here!**] |
[[Category:Libraries]] | [[Category:Libraries]] |
Latest revision as of 11:03, 21 January 2016
That simple library encode and decode files with a key.
Example:
Kuey = require("Kuey") local Encoded = Kuey.encode("Love is life!", "love2d") -- Encode the string with "love2d" as key print(Encoded) -- Show the encoded string print(Kuey.decode(Encoded, "anykey")) -- Try to show a decoded string with any key print(Kuey.decode(Encoded, "love2d")) -- Show the decoded string with the correct key
Output:
©Ìý╩R═▀ÅÔ╬ ÿ╔ì Wps_ýT~!ic3P, Love is life!
Available functions:
Kuey.encode(string, key) -- Return a string Kuey.decode(string, key) -- Return a string Kuey.encodeFile(filename, key[, outputname]) -- Return a string and write a file if outputname is defined. Kuey.decodeFile(filename, key[, outputname]) -- Return a string and write a file if outputname is defined.