Symmetric Decryption
The following table lists only the request parameters unique to this interface and some common parameters. For more information, see Common Parameters.
const columns = [ { width: '20%', title: 'Parameter', dataIndex: 'Name', className: 'openapi-doc-parameter-table-name' }, { width: 130, title: 'Type', dataIndex: 'DataType', className: 'openapi-doc-parameter-table-type' }, { width: 90, title: 'Required', dataIndex: 'IsRequired', className: 'openapi-doc-parameter-table-required' }, { width: '20%', title: 'Example', dataIndex: 'Example', className: 'openapi-doc-parameter-table-example' }, { title: 'Description', dataIndex: 'Description', className: 'openapi-doc-parameter-table-description' }, ]; const data = [ { rowKey: '->Action', Name: 'Action', DataType: 'String', IsRequired: 'yes', Example: <RenderMd content={"Decrypt"} />, Description: <RenderMd content={"Operation to execute, value: Decrypt."} />, children: [ ] }, { rowKey: '->Version', Name: 'Version', DataType: 'String', IsRequired: 'yes', Example: <RenderMd content={"2021-02-18"} />, Description: <RenderMd content={"API version, value: 2021-02-18."} />, children: [ ] }, { rowKey: '->EncryptionContext', Name: 'EncryptionContext', DataType: 'String', IsRequired: 'No', Example: <RenderMd content={"{"user":"alice","path":"path/to/alice/plaintext.txt"}"} />, Description: <RenderMd content={"JSON string of key/value pairs."} />, Description: <RenderMd content={"If this parameter is specified, the same parameter must be provided when calling Decrypt."} />, "} />, children: [ ] }, { rowKey: '->CiphertextBlob', Name: 'CiphertextBlob', DataType: 'String', IsRequired: 'yes', Example: <RenderMd content={"aaSgNwtCRlebbNLMueEN2gAA/Ijt5mhv0QfCLLKxpiF/QfSsTr2Yh8j7X/BWJ6JzhqmTGGXSRBf8RIzZiqZpuZ3ilC389YOnHoLahR5PjcEroYCEcbVxf7k+y8wVBE/O1XDdGK+5iBTzqy9k0y8="} />, Description: <RenderMd content={"decrypted data, value > 18"} />, children: [ ] }, ]; return (<Table rowKey="rowKey" className="openapi-doc-parameter-table" columns={columns} data={data} border={ { cell: true, wrapper: true } } scroll={ { x: "auto" } } pagination={false} />);
The table below lists only the return parameters specific to this interface. For more information, see Return Structure.
Parameter | Type | Example Value | Description |
|---|---|---|---|
Plaintext | String | tWB54tTvEu47YjRjuuj+fAt5PskpUaqwsjLeEy4YMNg= | Decrypted plaintext, Base64 encoded |
POST /?Action=Decrypt&Version=2021-02-18 HTTP/1.1 Host: kms.cn-beijing.volcengineapi.com Content-Type: application/json; charset=UTF-8 X-Date: 20240708T073658Z X-Content-Sha256: 287e874e******d653b44d21e Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20240708/cn-beijing/kms/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f { "CiphertextBlob":"aaSgNwtCRlebbNLMueEN2gAA/Ijt5mhv0QfCLLKxpiF/QfSsTr2Yh8j7X/BWJ6JzhqmTGGXSRBf8RIzZiqZpuZ3ilC389YOnHoLahR5PjcEroYCEcbVxf7k+y8wVBE/O1XDdGK+5iBTzqy9k0y8=" }
{ "ResponseMetadata": { "RequestId": "202407081537241800271190259E510F", "Action": "Decrypt", "Version": "2021-02-18", "Service": "kms", "Region": "cn-beijing" }, "Result": { "KeyringName": "demo", "KeyName": "demo", "Plaintext": "tWB54tTvEu47YjRjuuj+fAt5PskpUaqwsjLeEy4YMNg=" } }
The table below lists error codes related to this interface and business logic. Refer to the public error codes document for common error codes.
Status code | Error Code | Description |
|---|---|---|
400 | InvalidParameter | |
400 | InvalidKeyStatus | |
403 | Reject.Throttling.CMK | |
403 | AccessDenied | |
404 | Not Found | |
500 | UndefinedError |