數(shù)據解密(SM4)
## 接口名稱
數(shù)據加密(SM4)接口
## 接口描述
對傳入的SM4秘文進行(xíng)解密密。
## 接口地址
https://idr.gdsinsing.com/tool/sm4/decrypt
## 調用方式
|方法|數(shù)據類型|
|-|-|
|[ ] GET|[ ] form-data|
|[X] POST|[X] x-www-form-urlencoded|
|[ ] PUT|[ ] raw|
|[ ] DELETE||
## 參數(shù)說明(míng)
|參數(shù)名|類型|必填|說明(míng)|
|-|-|-|-|
|encryptedText|String|是|秘文|
|key|String|是|SM4密鑰|
## 返回結果
#### 成功返回
```JavaScript
{
"success": true,
"data": "ABCD",
"msg": "",
"ex": null
}
```
#### 失敗返回
```JavaScript
{
"success": false,
"data": null,
"msg": "解密失敗",
"ex": {
"code": "00300007",
"reason": "解密失敗",
"resolve": "請(qǐng)檢查密鑰是否正确。"
}
}
```
## 調用例子
``` JavaScript
var settings = {
"url": "https://idr.gdsinsing.com/tools/sm4/decrypt",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/x-www-form-urlencoded"
},
"data": {
"encryptedText": "+tiW9ZJf/EUnz080pXprRw==",
"key": "rZo/agnlc2T5FRJQz6i6rg=="
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
```