功能描述
通过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 = { |