view src/luan/modules/Binary.luan @ 1472:60f6741f000a

base64_encode
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 17 Apr 2020 11:16:38 -0600
parents 580ee513a4b7
children 70a55f49b98e
line wrap: on
line source

require "java"
local BinaryLuan = require "java:luan.modules.BinaryLuan"
local Base64 = require "java:java.util.Base64"


local Binary = {}

Binary.base64_decode = Base64.getDecoder().decode
Binary.base64_encode = Base64.getEncoder().encodeToString
Binary.binary = BinaryLuan.binary
Binary.byte = BinaryLuan.byte_
Binary.to_string = BinaryLuan.to_string

return Binary