数据签名(SM9)

## 接口名称 数据签名(SM9)接口 ## 接口描述 对传入的数据进行SM9签名。 ## 接口地址 https://idr.gdsinsing.com/tools/sm9/sign ## 调用方式 |方法|数据类型| |-|-| |[ ] GET|[ ] form-data| |[X] POST|[X] x-www-form-urlencoded| |[ ] PUT|[ ] raw| |[ ] DELETE|| ## 参数说明 |参数名|类型|必填|说明| |-|-|-|-| | rowText |String|是|原文| |privateKey|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": "oukNEjwhV17AnypeVGAY0alf3x+IsfECtRHlBgvNsjwtwfZR/bjBhsMQOh01x+/by6jUUyfgoUHCfYlCiIhiZiw3Lc7Fm1yh7oT3D2imT1ZHbzu12t/0gEk7RlX3vQst", "msg": "", "ex": null } ``` #### 失败返回 ```JavaScript { "success": false, "data": null, "msg": "签名失败。", "ex": { "code": "00300010", "reason": "签名失败。", "resolve": "请检查签名私钥与原文。" } } ``` ## 调用例子 ``` JavaScript var settings = { "url": "https://idr.gdsinsing.com/tools/sm9/sign", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/x-www-form-urlencoded" }, "data": { "rowText": "ABCD", "privateKey": "{SM9签名私钥}" } }; $.ajax(settings).done(function (response) { console.log(response); }); ```