encodeAES128 AES128加密
encodeAES128 ^7.10
AES128加密
#请求参数
| Prop | Type | Default | Comment |
|---|---|---|---|
| encode | String | N/A | 待加密的密文 |
| key | String | N/A | AES128密钥,选传参数,如果不传则取原生的密钥 |
#接口调用示例
const params = {
"encode": "待加密的密文",
"key": ""
}
this.$bridge
.encodeAES128(params)
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
#接口返回示例
//成功出参:
{
code:0,
msg:'加密成功',
data:'xxx'//被加密的字符串
}
// 失败出参:
{
code:-101, // code:-101参数为空, code:-102解密失败,明文为空
msg:'参数错误'
}
浙公网安备 33010602011771号