diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-11-02 15:17:48 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-11-02 15:17:49 -0700 |
| commit | 0f17c5eb9ac4660f2f969bd1e67af42713e45eac (patch) | |
| tree | 279ca7da2de0efe2f363684f3c84a540635f11a8 /lib/base64.nom | |
| parent | acd9c2acd4688f2301b091daad910c04e402bd6a (diff) | |
| parent | dc41f30c73c9686685e3a4183c1213fb4ba55c90 (diff) | |
Merge branch 'master' into working
Diffstat (limited to 'lib/base64.nom')
| -rw-r--r-- | lib/base64.nom | 8 |
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)) |
