更新记录
1.0.5(2023-05-29)
1.0.4(2023-05-16)
1.0.3(2023-05-15)
查看更多
平台兼容性
App |
快应用 |
微信小程序 |
支付宝小程序 |
百度小程序 |
字节小程序 |
QQ小程序 |
HBuilderX 3.6.8,Android:5.0,iOS:11,HarmonyNext:不确定 |
× |
× |
× |
× |
× |
× |
钉钉小程序 |
快手小程序 |
飞书小程序 |
京东小程序 |
× |
× |
× |
× |
H5-Safari |
Android Browser |
微信浏览器(Android) |
QQ浏览器(Android) |
Chrome |
IE |
Edge |
Firefox |
PC-Safari |
× |
× |
× |
× |
× |
× |
× |
× |
× |
UTS环境兼容性
文档目录
使用前提
- 1.导入插件
- 2.import模块并使用
- 3.打包基座并运行
使用说明
uts加密模块
getAppSignatureSHA1
获取app的签名sha1
import { getAppSignatureSHA1 } from '@/uni_modules/sn-uts-crypto'
console.log('app signature sha1', getAppSignatureSHA1())
getAppSignatureSHA256
获取app的签名sha256
import { getAppSignatureSHA256 } from '@/uni_modules/sn-uts-crypto'
console.log('app signature sha256', getAppSignatureSHA256())
getAppSignatureMD5
获取app的签名md5
import { getAppSignatureMD5 } from '@/uni_modules/sn-uts-crypto'
console.log('app signature md5', getAppSignatureMD5())
encryptMD5String
获取字符串md5
import { encryptMD5String } from '@/uni_modules/sn-uts-crypto'
encryptMD5String('test', e => {
console.log('md5', e)
})
encryptSHA1ToString
获取字符串sha1
import { encryptSHA1ToString } from '@/uni_modules/sn-uts-crypto'
encryptSHA1ToString('test', e => {
console.log('sha1', e)
})
encryptSHA256ToString
获取字符串sha256
import { encryptSHA256ToString } from '@/uni_modules/sn-uts-crypto'
encryptSHA256ToString('test', e => {
console.log('sha256', e)
})
encryptMD5File
获取文件md5
import { encryptMD5File } from '@/uni_modules/sn-uts-crypto'
encryptMD5File('/static/logo.png', e => {
console.log('md5', e)
})
encryptSHA1File
获取文件sha1
import { encryptSHA1File } from '@/uni_modules/sn-uts-crypto'
encryptSHA1File('/static/logo.png', e => {
console.log('sha1', e)
})
encryptSHA256File
获取文件sha256
import { encryptSHA256File } from '@/uni_modules/sn-uts-crypto'
encryptSHA256File('/static/logo.png', e => {
console.log('sha256', e)
})
changeFileMd5
修改文件md5
import { changeFileMd5 } from '@/uni_modules/sn-uts-crypto'
changeFileMd5('/static/logo.png', e => {
console.log('md5', e)
})