aboutsummaryrefslogtreecommitdiff
path: root/docs
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
commita34abc1d1c9fbd565fe00e14372fe815d25ef388 (patch)
treec9cee3eafcf00053952e7965bf47feaf828dfd30 /docs
parent80450829684b075d0324aea16df7bbfaed0034c4 (diff)
arbitrary base convertions
Diffstat (limited to 'docs')
-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)
+```