Key Management Service API, REST: SymmetricCrypto.decrypt
Статья создана
Обновлена 14 июня 2023 г.
Decrypts the given ciphertext with the specified key.
HTTP request
POST https://kms.yandex/kms/v1/keys/{keyId}:decrypt
Path parameters
Parameter | Description |
---|---|
keyId | Required. ID of the symmetric KMS key to use for decryption. The maximum string length in characters is 50. |
Body parameters
{
"aadContext": "string",
"ciphertext": "string"
}
Field | Description |
---|---|
aadContext | string (byte) Additional authenticated data, must be the same as was provided in the corresponding The maximum string length in characters is 8192. |
ciphertext | string (byte) Required. Ciphertext to be decrypted. Should be encoded with base64. |
Response
HTTP Code: 200 - OK
{
"keyId": "string",
"versionId": "string",
"plaintext": "string"
}
Field | Description |
---|---|
keyId | string ID of the symmetric KMS key that was used for decryption. |
versionId | string ID of the key version that was used for decryption. |
plaintext | string (byte) Decrypted plaintext. |