From 62d15ac7c1fcd7214a9e45d46bbc560f998edb95 Mon Sep 17 00:00:00 2001 From: red-001 Date: Sat, 28 May 2016 04:37:28 +0100 Subject: Add base64 encoding and decoding to the lua api. (#3919) --- doc/lua_api.txt | 4 ++++ doc/menu_lua_api.txt | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 593e0c438..01763fd73 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -2438,6 +2438,10 @@ These functions return the leftover itemstack. * See documentation on `minetest.compress()` for supported compression methods. * currently supported. * `...` indicates method-specific arguments. Currently, no methods use this. +* `minetest.encode_base64(string)`: returns string encoded in base64 + * Encodes a string in base64. +* `minetest.decode_base64(string)`: returns string + * Decodes a string encoded in base64. * `minetest.is_protected(pos, name)`: returns boolean * Returns true, if player `name` shouldn't be abled to dig at `pos` or do other actions, defineable by mods, due to some mod-defined ownership-like concept. diff --git a/doc/menu_lua_api.txt b/doc/menu_lua_api.txt index ac8713a32..479880266 100644 --- a/doc/menu_lua_api.txt +++ b/doc/menu_lua_api.txt @@ -210,6 +210,10 @@ string:trim() ^ eg. string.trim("\n \t\tfoo bar\t ") == "foo bar" core.is_yes(arg) (possible in async calls) ^ returns whether arg can be interpreted as yes +minetest.encode_base64(string) (possible in async calls) +^ Encodes a string in base64. +minetest.decode_base64(string) (possible in async calls) +^ Decodes a string encoded in base64. Version compat: core.get_min_supp_proto() -- cgit v1.2.3