获取非对称密钥私钥

<p class="shortdesc"></p> <section class="section" id="GainPrivateKey__section_zcf_mfj_mlb"><h2 class="doc-tairway">获取非对称密钥私钥:GainPrivateKey</h2> <p class="p"><strong class="ph b">描述</strong></p> <p class="p">查询管理的非对称密钥私钥,返回的值是经过AES_128对称加密的密文,使用时需要进行对称解密。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="GainPrivateKey__table_ohv_mfj_mlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="GainPrivateKey__table_ohv_mfj_mlb__entry__1"> <p class="p">名称</p> </th> <th class="entry" id="GainPrivateKey__table_ohv_mfj_mlb__entry__2"> <p class="p">类型</p> </th> <th class="entry" id="GainPrivateKey__table_ohv_mfj_mlb__entry__3"> <p class="p">是否必须</p> </th> <th class="entry" id="GainPrivateKey__table_ohv_mfj_mlb__entry__4"> <p class="p">描述</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__1 "> <p class="p">requestTime</p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__3 "> <p class="p">是</p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__4 "> <p class="p">请求时间,格式为:yyyyMMddhhmmssSSS</p> </td> </tr> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__1 "> <p class="p">appId</p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__3 "> <p class="p">是</p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__4 "> <p class="p">非对称密钥对应的唯一识别码,由KMS创建非对称密钥时自动分配产生</p> </td> </tr> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__1 "> <p class="p">asyKeyType</p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__3 "> <p class="p">是</p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__4 "> <p class="p">非对称密钥类型</p> </td> </tr> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__1 "> <p class="p">encryptVersion</p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__3 "> <p class="p">否</p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__4 "> <p class="p">加密版本(获取到的密码的加密方式)</p> <p class="p">可选字段,用于区分加解密模式,兼容AES的ECB和CBC两种模式</p> <p class="p">传参,encryptVersion="2.0",为AES的CBC加密模式</p> <p class="p">不传参,则默认为AES的ECB加密方式</p> <p class="p">目前仅支持上面两种方式,否则会报参数错误</p> </td> </tr> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__1 "> <p class="p">sign</p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__3 "> <p class="p">是</p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__4 "> <p class="p">签名值,见签名算法(16进制字符串)</p> </td> </tr> </tbody></table> <p class="p"><strong class="ph b">返回参数</strong></p> <table class="table" id="GainPrivateKey__table_phv_mfj_mlb"><caption></caption><colgroup><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="GainPrivateKey__table_phv_mfj_mlb__entry__1"> <p class="p">名称</p> </th> <th class="entry" id="GainPrivateKey__table_phv_mfj_mlb__entry__2"> <p class="p">类型</p> </th> <th class="entry" id="GainPrivateKey__table_phv_mfj_mlb__entry__3"> <p class="p">描述</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__1 "> <p class="p">Code</p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__3 "> <p class="p">返回码,成功返回“SUCCESS”</p> </td> </tr> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__1 "> <p class="p">AppId</p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__3 "> <p class="p">对请求签名数据进行私钥签名运算后的签名值</p> </td> </tr> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__1 "> <p class="p">EncryptedPrivateKey</p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__3 "> <p class="p">获取到的私钥密文</p> </td> </tr> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__1 "> <p class="p">ResponseTime</p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__3 "> <p class="p">响应时间,格式为:yyyyMMddhhmmssSSS</p> </td> </tr> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__1 "> <p class="p">Sign</p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__3 "> <p class="p">见签名算法</p> </td> </tr> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__1 "> <p class="p">RequestId</p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__3 "> <p class="p">当前请求Id</p> </td> </tr> </tbody></table> <p class="p"><strong class="ph b">请求示例</strong></p> <pre class="pre codeblock"><code>http:// kms-cn-shanghai.yun.pingan.com/?action= GainPrivateKey &appId =<app id > &sign=<sign> &requestTime=<requestTime> & encryptVersion=< encryptVersion > & asyKeyType =<type> &<公共请求参数></code></pre> <p class="p"><strong class="ph b">返回示例</strong></p> <pre class="pre codeblock"><code>{ "Code":"SUCCESS", "AppId":"app_id", "EncryptedPrivateKey":"privateKey", "ResponseTime":"time", "Sign":"signatureValue" "RequestId":"f244ca16-c944-484f-9728-bb3e9c31643a", }</code></pre> </section>
以上内容是否解决了您的问题?
请补全提交信息!
咨询·建议

电话咨询 - 7x24 小时

400-151-8800

邮件咨询

cloud@pingan.com

在线客服

7x24 小时,急速解答

工单支持

解决云产品相关技术问题