annotate src/luan/modules/Binary.luan @ 1716:b82767112d8e

add String.regex
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 24 Jul 2022 23:43:03 -0600
parents f7e2df85fc0a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1353
8d95711f6615 replace java() with require "java"
Franklin Schmidt <fschmidt@gmail.com>
parents: 1088
diff changeset
1 require "java"
321
7f7708e8fdd4 remove import statement
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents: 320
diff changeset
2 local BinaryLuan = require "java:luan.modules.BinaryLuan"
1470
Franklin Schmidt <fschmidt@gmail.com>
parents: 1353
diff changeset
3 local Base64 = require "java:java.util.Base64"
1516
70a55f49b98e digest_message
Franklin Schmidt <fschmidt@gmail.com>
parents: 1472
diff changeset
4 local MessageDigest = require "java:java.security.MessageDigest"
302
2f8938fc518c fix modules Binary and Html
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
diff changeset
5
567
6c00b8a59240 document Binary
Franklin Schmidt <fschmidt@gmail.com>
parents: 503
diff changeset
6
1088
bae2d0c2576c change module naming convention
Franklin Schmidt <fschmidt@gmail.com>
parents: 775
diff changeset
7 local Binary = {}
503
92c3d22745b8 make _ENV optional
Franklin Schmidt <fschmidt@gmail.com>
parents: 360
diff changeset
8
1470
Franklin Schmidt <fschmidt@gmail.com>
parents: 1353
diff changeset
9 Binary.base64_decode = Base64.getDecoder().decode
1472
60f6741f000a base64_encode
Franklin Schmidt <fschmidt@gmail.com>
parents: 1470
diff changeset
10 Binary.base64_encode = Base64.getEncoder().encodeToString
1088
bae2d0c2576c change module naming convention
Franklin Schmidt <fschmidt@gmail.com>
parents: 775
diff changeset
11 Binary.binary = BinaryLuan.binary
bae2d0c2576c change module naming convention
Franklin Schmidt <fschmidt@gmail.com>
parents: 775
diff changeset
12 Binary.byte = BinaryLuan.byte_
1649
f7e2df85fc0a add String.digest_message
Franklin Schmidt <fschmidt@gmail.com>
parents: 1516
diff changeset
13 Binary.digest_message = BinaryLuan.digest_message
f7e2df85fc0a add String.digest_message
Franklin Schmidt <fschmidt@gmail.com>
parents: 1516
diff changeset
14 Binary.to_hex = BinaryLuan.to_hex
1088
bae2d0c2576c change module naming convention
Franklin Schmidt <fschmidt@gmail.com>
parents: 775
diff changeset
15 Binary.to_string = BinaryLuan.to_string
503
92c3d22745b8 make _ENV optional
Franklin Schmidt <fschmidt@gmail.com>
parents: 360
diff changeset
16
1088
bae2d0c2576c change module naming convention
Franklin Schmidt <fschmidt@gmail.com>
parents: 775
diff changeset
17 return Binary