//放入AWZX.mlua function get() import "android.content.Intent" local intent= Intent(Intent.ACTION_PICK) intent:setType("image/*") activity:startActivityForResult(intent,4) end
function Path(uri) import "android.provider.MediaStore$Images$Media" local proj = i:sl(Media.DATA,":") local cursor = activity:managedQuery(uri,proj,nil,nil,nil) local column_index = cursor:getColumnIndexOrThrow(Media.DATA) cursor:moveToFirst() return cursor:getString(column_index) end
s 原文 = "残页"
java(字节数组,原文,"java.lang.String.getBytes")
//转成byte[]字节数组
java(密文,null,"android.util.Base64.encodeToString","byte[]",字节数组,"int",0)
//Base64编码,0是模式
//如果失败请更改模式
/.
模式列表:
DEFAULT=0
NO_PADDING=1
NO_WRAP=2
CRLF=4
URL_SAFE=8
./
tw(密文)
//base64解码:
s 密文 = "5q6L6aG1"
java(字节数组,null,"android.util.Base64.decode","String",密文,"int",0)
//Base64解码,0是模式
//如果失败请更改模式
javanew(原文,"java.lang.String","byte[]",字节数组)
//由于返回的是byte[]字节数组,所以转化成字符串
tw(原文)
//作者:残页
举报 0