加密

<p class="shortdesc"></p> <section class="section" id="Encrypt__section_tjg_k2j_mlb"><h2 class="doc-tairway">加密:Encrypt</h2> <p class="p"><strong class="ph b">描述</strong></p> <p class="p">通过使用用户主密钥(CMK)将明文加密为密文。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Encrypt__table_gqd_l2j_mlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Encrypt__table_gqd_l2j_mlb__entry__1"> <p class="p">名称</p> </th> <th class="entry" id="Encrypt__table_gqd_l2j_mlb__entry__2"> <p class="p">类型</p> </th> <th class="entry" id="Encrypt__table_gqd_l2j_mlb__entry__3"> <p class="p">是否必需</p> </th> <th class="entry" id="Encrypt__table_gqd_l2j_mlb__entry__4"> <p class="p">描述</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Encrypt__table_gqd_l2j_mlb__entry__1 "> <p class="p">keyId</p> </td> <td class="entry" headers="Encrypt__table_gqd_l2j_mlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="Encrypt__table_gqd_l2j_mlb__entry__3 "> <p class="p">是</p> </td> <td class="entry" headers="Encrypt__table_gqd_l2j_mlb__entry__4 "> <p class="p">密钥的全局唯一标识符</p> </td> </tr> <tr class="row"> <td class="entry" headers="Encrypt__table_gqd_l2j_mlb__entry__1 "> <p class="p">plaintext</p> </td> <td class="entry" headers="Encrypt__table_gqd_l2j_mlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="Encrypt__table_gqd_l2j_mlb__entry__3 "> <p class="p">是</p> </td> <td class="entry" headers="Encrypt__table_gqd_l2j_mlb__entry__4 "> <p class="p">待加密明文</p> </td> </tr> <tr class="row"> <td class="entry" headers="Encrypt__table_gqd_l2j_mlb__entry__1 "> <p class="p">encryptionContext</p> </td> <td class="entry" headers="Encrypt__table_gqd_l2j_mlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="Encrypt__table_gqd_l2j_mlb__entry__3 "> <p class="p">否</p> </td> <td class="entry" headers="Encrypt__table_gqd_l2j_mlb__entry__4 "> <p class="p">附加盐值,如果指定了该参数,则在调用Decrypt 时需要提供同样的参数</p> </td> </tr> </tbody></table> <p class="p"><strong class="ph b">返回参数</strong></p> <table class="table" id="Encrypt__table_hqd_l2j_mlb"><caption></caption><colgroup><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Encrypt__table_hqd_l2j_mlb__entry__1"> <p class="p">名称</p> </th> <th class="entry" id="Encrypt__table_hqd_l2j_mlb__entry__2"> <p class="p">类型</p> </th> <th class="entry" id="Encrypt__table_hqd_l2j_mlb__entry__3"> <p class="p">描述</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Encrypt__table_hqd_l2j_mlb__entry__1 "> <p class="p">code</p> </td> <td class="entry" headers="Encrypt__table_hqd_l2j_mlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="Encrypt__table_hqd_l2j_mlb__entry__3 "> <p class="p">返回码,成功返回"SUCCESS"</p> </td> </tr> <tr class="row"> <td class="entry" headers="Encrypt__table_hqd_l2j_mlb__entry__1 "> <p class="p">keyId</p> </td> <td class="entry" headers="Encrypt__table_hqd_l2j_mlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="Encrypt__table_hqd_l2j_mlb__entry__3 "> <p class="p">密钥的全局唯一标识符</p> </td> </tr> <tr class="row"> <td class="entry" headers="Encrypt__table_hqd_l2j_mlb__entry__1 "> <p class="p">cipherTextBlob</p> </td> <td class="entry" headers="Encrypt__table_hqd_l2j_mlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="Encrypt__table_hqd_l2j_mlb__entry__3 "> <p class="p">加密过的密文</p> </td> </tr> <tr class="row"> <td class="entry" headers="Encrypt__table_hqd_l2j_mlb__entry__1 "> <p class="p">requestId</p> </td> <td class="entry" headers="Encrypt__table_hqd_l2j_mlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="Encrypt__table_hqd_l2j_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>https://kms-cn-shanghai.yun.pingan.com/?action=Encrypt &keyId=<cmkid> &plainText=<your plain text> &encryptionContext=< encryption context > &<公共请求参数></code></pre> <p class="p"><strong class="ph b">返回示例</strong></p> <pre class="pre codeblock"><code>{ "code": "SUCCESS", "cipherTextBlob": "your cipher text blob", "keyId": "your key id", "requestId": "338c8960-7f4a-4e31-9690-ff1de2921e06" }</code></pre> </section>
以上内容是否解决了您的问题?
请补全提交信息!
咨询·建议

电话咨询

400-151-8800

邮件咨询

cloud@pingan.com

在线客服

工单支持

解决云产品相关技术问题