File tree Expand file tree Collapse file tree 1 file changed +5
-16
lines changed
Expand file tree Collapse file tree 1 file changed +5
-16
lines changed Original file line number Diff line number Diff line change @@ -32,23 +32,12 @@ dGhpcyBpcyBhIDx0YWc-IGFuZCBzaG91bGQgYmUgZW5jb2RlZA==
3232``` lua
3333local hex = require ' hex'
3434
35- s , err = hex .decode_string (" Zm9vAWJhcg " )
35+ decoded , err = hex .decode_string (" 666f6f62617262617a " )
3636assert (not err , err )
37- print (s )
38- foo bar
39-
40- s , err = hex .StdEncoding :decode_string (" Zm9vAWJhcg==" )
41- assert (not err , err )
42- print (s )
37+ print (decoded )
4338foo bar
4439
45- s , err = hex .RawURLEncoding :decode_string (" dGhpcyBpcyBhIDx0YWc-IGFuZCBzaG91bGQgYmUgZW5jb2RlZA" )
46- assert (not err , err )
47- print (s )
48- this is a <tag> and should be encoded
49-
50- s , err = hex .URLEncoding :decode_string (" dGhpcyBpcyBhIDx0YWc-IGFuZCBzaG91bGQgYmUgZW5jb2RlZA==" )
51- assert (not err , err )
52- print (s )
53- this is a <tag> and should be encoded
40+ encoded = hex .encode_to_string (decoded )
41+ print (encoded )
42+ 666 f6f62617262617a
5443```
You can’t perform that action at this time.
0 commit comments