LightSDK.native.sm2Decrypt

功能描述

通过js接口实现国密sm2解密

支持格式

Json

请求参数:

字段 可选 类型及范围 说明
cipherText string 密文
privateKey string sm2私钥

请求调用示例

params={
"privateKey": privateKey,
"cipherText": decrptContent
}
LightSDK.native.sm2Decrypt(params,cb);

返回值说明

字段名 字段类型 说明
plainText string 返回明文

返回字段示例

"data":{"plainText":"hundsun" }

注意事项

需要在config.js配置文件中做以下配置:

module.exports = {
plugins:{
"crypto": {}
}
};