aboutsummaryrefslogtreecommitdiff
path: root/lib/base64.nom
diff options
context:
space:
mode:
Diffstat (limited to 'lib/base64.nom')
-rw-r--r--lib/base64.nom8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/base64.nom b/lib/base64.nom
index 8fc4e6b..2091615 100644
--- a/lib/base64.nom
+++ b/lib/base64.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V4.8.8.6
+#!/usr/bin/env nomsu -V4.8.10
#
This file defines actions for encoding/decoding base 64, as specified in:
https://tools.ietf.org/html/rfc4648
@@ -13,7 +13,7 @@ test:
%plain = "foobar".[1, %len - 1]
assume (base64 %plain) == %encoded
assume (base64 decode %encoded) == %plain
-action [base64 %str, base64 encode %str, %str base64]:
+externally [base64 %str, base64 encode %str, %str base64] all mean:
%chars = []
for %i in 1 to (size of %str) via 3:
%bytes = [=lua "\%str:byte(\%i, \(%i + 2))"]
@@ -36,8 +36,8 @@ action [base64 %str, base64 encode %str, %str base64]:
return (%chars::joined)
-action [chr %] (=lua "string.char(\%)")
-action [decode base64 %str, %str base64 decoded, base64 decode %str]:
+externally (chr %) means (=lua "string.char(\%)")
+externally [decode base64 %str, %str base64 decoded, base64 decode %str] all mean:
%chars = []
for %i in 1 to (size of %str) via 4:
%indices = (%reverse_b64.(%str.%) for % in %i to (%i + 3))