加密

<p><span style="font-size:18px"><strong>加密:Encrypt</strong></span></p> <p><span style="font-size:14px"><strong>描述:</strong></span></p> <p>通过使用用户主密钥(CMK)将明文加密为密文。</p> <p><span style="font-size:14px"><strong>请求参数:</strong></span></p> <table border="1" cellpadding="1" cellspacing="1"> <tbody> <tr> <td style="background-color:#ededed"><strong>名称</strong></td> <td style="background-color:#ededed"><strong>类型</strong></td> <td style="background-color:#ededed"><strong>是否必需</strong></td> <td style="background-color:#ededed"><strong>描述</strong></td> </tr> <tr> <td>keyId</td> <td>String</td> <td>是</td> <td>密钥的全局唯一标识符</td> </tr> <tr> <td>plaintext</td> <td>String</td> <td>是</td> <td>待加密明文</td> </tr> <tr> <td>encryptionContext</td> <td>String</td> <td>否</td> <td>附加盐值,如果指定了该参数,则在调用Decrypt&nbsp;时需要提供同样的参数</td> </tr> </tbody> </table> <p><span style="font-size:14px"><strong>返回参数:</strong></span></p> <table border="1" cellpadding="1" cellspacing="1"> <tbody> <tr> <td style="background-color:#ededed"><strong>名称</strong></td> <td style="background-color:#ededed"><strong>类型</strong></td> <td style="background-color:#ededed"><strong>描述</strong></td> </tr> <tr> <td>code</td> <td>String</td> <td>返回码,成功返回&quot;SUCCESS&quot;</td> </tr> <tr> <td>keyId</td> <td>String</td> <td>密钥的全局唯一标识符</td> </tr> <tr> <td>cipherTextBlob</td> <td>String</td> <td>加密过的密文</td> </tr> <tr> <td>requestId</td> <td>String</td> <td>当前请求Id</td> </tr> </tbody> </table> <p><span style="font-size:14px"><strong>请求示例:</strong></span></p> <pre> <code>https://kms-cn-shanghai.ocftcloud.com/?action=Encrypt &amp;keyId=&lt;cmkid&gt; &amp;plainText=&lt;your plain text&gt; &amp;encryptionContext=&lt; encryption context &gt; &amp;&lt;公共请求参数&gt;</code></pre> <p><span style="font-size:14px"><strong>返回示例:</strong></span></p> <pre> <code>{       "code": "SUCCESS",       "cipherTextBlob": "your cipher text blob",       "keyId": "your key id",       "requestId": "338c8960-7f4a-4e31-9690-ff1de2921e06" }</code></pre> <p>&nbsp;</p>
以上内容是否解决了您的问题?
请补全提交信息!
联系我们

电话咨询

400-151-8800

邮件咨询

fincloud@ocft.com

在线客服

工单支持

解决云产品相关技术问题