aboutsummaryrefslogtreecommitdiff
path: root/docs/crypto.md
diff options
context:
space:
mode:
authorame <[email protected]>2023-12-25 15:10:09 -0600
committerame <[email protected]>2023-12-25 15:10:09 -0600
commitddb25e94961f0eb9f5f615db83b316d3c222da81 (patch)
treec9cee3eafcf00053952e7965bf47feaf828dfd30 /docs/crypto.md
parent086f2b9ee90c72d73513b5b0e2488aa8999b2b00 (diff)
arbitrary base convertions
Diffstat (limited to 'docs/crypto.md')
-rw-r--r--docs/crypto.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/crypto.md b/docs/crypto.md
index 01fe7be..997ede9 100644
--- a/docs/crypto.md
+++ b/docs/crypto.md
@@ -77,3 +77,14 @@ all functions have 1 argument which is a string, unless noted otherwise
llib.crypto.base64encode("purr") -- cHVycg==
llib.crypto.base64decode("cHVycg==") -- purr
```
+
+## baseconvert
+
+'accepts an array of integers
+
+converts an array from base N to base T (in reversed order)
+
+```lua
+-- input N T
+llib.crypto.baseconvert({1, 1, 0, 1, 0, 1, 0, 0, 0, 1}, 2, 10) -- {9, 4, 8} (which is 849)
+```