数据解密(SM9)

## 接口名称 数据解密(SM9)接口 ## 接口描述 对传入的SM9加密数据进行解密。 ## 接口地址 https://idr.gdsinsing.com/tools/sm9/decrypt ## 调用方式 |方法|数据类型| |-|-| |[ ] GET|[ ] form-data| |[X] POST|[X] x-www-form-urlencoded| |[ ] PUT|[ ] raw| |[ ] DELETE|| ## 参数说明 |参数名|位置|类型|必填|说明| |-|-|-|-|-| | cipherText |body|String|是|密文| |publicKey|body|String|是|加密公钥(SM9)| | privateKey |body|String|是|加密私钥(SM9)| ## 返回结果 |属性名称|位置|数据类型|说明| |-|-|-|-| |success||Boolean|接口调用结果(fasle:调用失败,true:调用成功)| |data||String|返回SM9解密结果| |msg||String|接口调用结果的文字描述(一般为错误异常描述)| |ex||Json|异常信息| |code|ex|String|错误码| |reson|ex|String|错误异常信息| |resolve|ex|String|处理方法文字描述| #### 成功返回 ```JavaScript { "success": true, "data": "ABCD", "msg": "", "ex": null } ``` #### 失败返回 ```JavaScript { "success": false, "data": null, "msg": "解密失败。", "ex": { "code": "00300015", "reason": "解密失败。", "resolve": "请检查加密私钥,密文。" } } ``` ## 调用例子 ``` JavaScript var settings = { "url": "https://idr.gdsinsing.com/tools/sm9/decrypt", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/x-www-form-urlencoded" }, "data": { "cipherText": "o6+7jo3Z1iNcBxKoAcQxqVhEm7YIGuysrfNd1KxlpGE7E93ja2EIiz2NYpfKyH2G/koFn/d8nSz5l94gQekEYnOxboG482Ecuymr2bUmzEkywA87airk14ToFZVSFFgsg5AEnQ==", "publicKey": "{加密公钥}", "privateKey": "{加密私钥}" } }; $.ajax(settings).done(function (response) { console.log(response); }); ```