Integrity verification field. A CRC32C checksum of the returnedDecryptResponse.plaintext. An integrity check ofDecryptResponse.plaintextcan be performed by computing the CRC32C checksum ofDecryptResponse.plaintextand comparing your results to this field. Discard the response in case of non-matching checksum values, and perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: receiving this response message indicates thatKeyManagementServiceis able to successfully decrypt theciphertext. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.
↳ used_primary
bool
Whether the Decryption was performed using the primary key version.
An integrity check ofDecryptResponse.plaintextcan be performed by computing the CRC32C checksum ofDecryptResponse.plaintextand comparing your results to this field. Discard the response in case of
non-matching checksum values, and perform a limited number of retries. A
persistent mismatch may indicate an issue in your computation of the CRC32C
checksum. Note: receiving this response message indicates thatKeyManagementServiceis able to
successfully decrypt theciphertext. Note: This
field is defined as int64 for reasons of compatibility across different
languages. However, it is a non-negative integer, which will never exceed
2^32-1, and can be safely downconverted to uint32 in languages that support
this type.
Returns the unboxed value fromgetPlaintextCrc32C()
Integrity verification field. A CRC32C checksum of the returnedDecryptResponse.plaintext.
An integrity check ofDecryptResponse.plaintextcan be performed by computing the CRC32C checksum ofDecryptResponse.plaintextand comparing your results to this field. Discard the response in case of
non-matching checksum values, and perform a limited number of retries. A
persistent mismatch may indicate an issue in your computation of the CRC32C
checksum. Note: receiving this response message indicates thatKeyManagementServiceis able to
successfully decrypt theciphertext. Note: This
field is defined as int64 for reasons of compatibility across different
languages. However, it is a non-negative integer, which will never exceed
2^32-1, and can be safely downconverted to uint32 in languages that support
this type.
An integrity check ofDecryptResponse.plaintextcan be performed by computing the CRC32C checksum ofDecryptResponse.plaintextand comparing your results to this field. Discard the response in case of
non-matching checksum values, and perform a limited number of retries. A
persistent mismatch may indicate an issue in your computation of the CRC32C
checksum. Note: receiving this response message indicates thatKeyManagementServiceis able to
successfully decrypt theciphertext. Note: This
field is defined as int64 for reasons of compatibility across different
languages. However, it is a non-negative integer, which will never exceed
2^32-1, and can be safely downconverted to uint32 in languages that support
this type.
Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object.
Integrity verification field. A CRC32C checksum of the returnedDecryptResponse.plaintext.
An integrity check ofDecryptResponse.plaintextcan be performed by computing the CRC32C checksum ofDecryptResponse.plaintextand comparing your results to this field. Discard the response in case of
non-matching checksum values, and perform a limited number of retries. A
persistent mismatch may indicate an issue in your computation of the CRC32C
checksum. Note: receiving this response message indicates thatKeyManagementServiceis able to
successfully decrypt theciphertext. Note: This
field is defined as int64 for reasons of compatibility across different
languages. However, it is a non-negative integer, which will never exceed
2^32-1, and can be safely downconverted to uint32 in languages that support
this type.
Parameter
Name
Description
var
int|string|null
Returns
Type
Description
$this
getUsedPrimary
Whether the Decryption was performed using the primary key version.
Returns
Type
Description
bool
setUsedPrimary
Whether the Decryption was performed using the primary key version.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud KMS V1 Client - Class DecryptResponse (2.3.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.3.1 (latest)](/php/docs/reference/cloud-kms/latest/V1.DecryptResponse)\n- [2.3.0](/php/docs/reference/cloud-kms/2.3.0/V1.DecryptResponse)\n- [2.2.0](/php/docs/reference/cloud-kms/2.2.0/V1.DecryptResponse)\n- [2.1.6](/php/docs/reference/cloud-kms/2.1.6/V1.DecryptResponse)\n- [2.0.0](/php/docs/reference/cloud-kms/2.0.0/V1.DecryptResponse)\n- [1.23.0](/php/docs/reference/cloud-kms/1.23.0/V1.DecryptResponse)\n- [1.22.1](/php/docs/reference/cloud-kms/1.22.1/V1.DecryptResponse)\n- [1.21.4](/php/docs/reference/cloud-kms/1.21.4/V1.DecryptResponse)\n- [1.20.3](/php/docs/reference/cloud-kms/1.20.3/V1.DecryptResponse)\n- [1.19.0](/php/docs/reference/cloud-kms/1.19.0/V1.DecryptResponse)\n- [1.18.1](/php/docs/reference/cloud-kms/1.18.1/V1.DecryptResponse)\n- [1.17.0](/php/docs/reference/cloud-kms/1.17.0/V1.DecryptResponse)\n- [1.16.4](/php/docs/reference/cloud-kms/1.16.4/V1.DecryptResponse)\n- [1.15.3](/php/docs/reference/cloud-kms/1.15.3/V1.DecryptResponse) \nReference documentation and code samples for the Cloud KMS V1 Client class DecryptResponse.\n\nResponse message for\n[KeyManagementService.Decrypt](/php/docs/reference/cloud-kms/latest/V1.Client.KeyManagementServiceClient#_Google_Cloud_Kms_V1_Client_KeyManagementServiceClient__decrypt__).\n\nGenerated from protobuf message `google.cloud.kms.v1.DecryptResponse`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Kms \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getPlaintext\n\nThe decrypted data originally supplied in\n[EncryptRequest.plaintext](/php/docs/reference/cloud-kms/latest/V1.EncryptRequest#_Google_Cloud_Kms_V1_EncryptRequest__getPlaintext__).\n\n### setPlaintext\n\nThe decrypted data originally supplied in\n[EncryptRequest.plaintext](/php/docs/reference/cloud-kms/latest/V1.EncryptRequest#_Google_Cloud_Kms_V1_EncryptRequest__getPlaintext__).\n\n### getPlaintextCrc32C\n\nIntegrity verification field. A CRC32C checksum of the returned\n[DecryptResponse.plaintext](/php/docs/reference/cloud-kms/latest/V1.DecryptResponse#_Google_Cloud_Kms_V1_DecryptResponse__getPlaintext__).\n\nAn integrity check of\n[DecryptResponse.plaintext](/php/docs/reference/cloud-kms/latest/V1.DecryptResponse#_Google_Cloud_Kms_V1_DecryptResponse__getPlaintext__)\ncan be performed by computing the CRC32C checksum of\n[DecryptResponse.plaintext](/php/docs/reference/cloud-kms/latest/V1.DecryptResponse#_Google_Cloud_Kms_V1_DecryptResponse__getPlaintext__)\nand comparing your results to this field. Discard the response in case of\nnon-matching checksum values, and perform a limited number of retries. A\npersistent mismatch may indicate an issue in your computation of the CRC32C\nchecksum. Note: receiving this response message indicates that\n[KeyManagementService](/php/docs/reference/cloud-kms/latest/V1.Client.KeyManagementServiceClient) is able to\nsuccessfully decrypt the\n[ciphertext](/php/docs/reference/cloud-kms/latest/V1.DecryptRequest#_Google_Cloud_Kms_V1_DecryptRequest__getCiphertext__). Note: This\nfield is defined as int64 for reasons of compatibility across different\nlanguages. However, it is a non-negative integer, which will never exceed\n2\\^32-1, and can be safely downconverted to uint32 in languages that support\nthis type.\n\n### hasPlaintextCrc32C\n\n### clearPlaintextCrc32C\n\n### getPlaintextCrc32CUnwrapped\n\nReturns the unboxed value from `getPlaintextCrc32C()`\n\nIntegrity verification field. A CRC32C checksum of the returned\n[DecryptResponse.plaintext](/php/docs/reference/cloud-kms/latest/V1.DecryptResponse#_Google_Cloud_Kms_V1_DecryptResponse__getPlaintext__).\nAn integrity check of\n[DecryptResponse.plaintext](/php/docs/reference/cloud-kms/latest/V1.DecryptResponse#_Google_Cloud_Kms_V1_DecryptResponse__getPlaintext__)\ncan be performed by computing the CRC32C checksum of\n[DecryptResponse.plaintext](/php/docs/reference/cloud-kms/latest/V1.DecryptResponse#_Google_Cloud_Kms_V1_DecryptResponse__getPlaintext__)\nand comparing your results to this field. Discard the response in case of\nnon-matching checksum values, and perform a limited number of retries. A\npersistent mismatch may indicate an issue in your computation of the CRC32C\nchecksum. Note: receiving this response message indicates that\n[KeyManagementService](/php/docs/reference/cloud-kms/latest/V1.Client.KeyManagementServiceClient) is able to\nsuccessfully decrypt the\n[ciphertext](/php/docs/reference/cloud-kms/latest/V1.DecryptRequest#_Google_Cloud_Kms_V1_DecryptRequest__getCiphertext__). Note: This\nfield is defined as int64 for reasons of compatibility across different\nlanguages. However, it is a non-negative integer, which will never exceed\n2\\^32-1, and can be safely downconverted to uint32 in languages that support\nthis type.\n\n### setPlaintextCrc32C\n\nIntegrity verification field. A CRC32C checksum of the returned\n[DecryptResponse.plaintext](/php/docs/reference/cloud-kms/latest/V1.DecryptResponse#_Google_Cloud_Kms_V1_DecryptResponse__getPlaintext__).\n\nAn integrity check of\n[DecryptResponse.plaintext](/php/docs/reference/cloud-kms/latest/V1.DecryptResponse#_Google_Cloud_Kms_V1_DecryptResponse__getPlaintext__)\ncan be performed by computing the CRC32C checksum of\n[DecryptResponse.plaintext](/php/docs/reference/cloud-kms/latest/V1.DecryptResponse#_Google_Cloud_Kms_V1_DecryptResponse__getPlaintext__)\nand comparing your results to this field. Discard the response in case of\nnon-matching checksum values, and perform a limited number of retries. A\npersistent mismatch may indicate an issue in your computation of the CRC32C\nchecksum. Note: receiving this response message indicates that\n[KeyManagementService](/php/docs/reference/cloud-kms/latest/V1.Client.KeyManagementServiceClient) is able to\nsuccessfully decrypt the\n[ciphertext](/php/docs/reference/cloud-kms/latest/V1.DecryptRequest#_Google_Cloud_Kms_V1_DecryptRequest__getCiphertext__). Note: This\nfield is defined as int64 for reasons of compatibility across different\nlanguages. However, it is a non-negative integer, which will never exceed\n2\\^32-1, and can be safely downconverted to uint32 in languages that support\nthis type.\n\n### setPlaintextCrc32CUnwrapped\n\nSets the field by wrapping a primitive type in a Google\\\\Protobuf\\\\Int64Value object.\n\nIntegrity verification field. A CRC32C checksum of the returned\n[DecryptResponse.plaintext](/php/docs/reference/cloud-kms/latest/V1.DecryptResponse#_Google_Cloud_Kms_V1_DecryptResponse__getPlaintext__).\nAn integrity check of\n[DecryptResponse.plaintext](/php/docs/reference/cloud-kms/latest/V1.DecryptResponse#_Google_Cloud_Kms_V1_DecryptResponse__getPlaintext__)\ncan be performed by computing the CRC32C checksum of\n[DecryptResponse.plaintext](/php/docs/reference/cloud-kms/latest/V1.DecryptResponse#_Google_Cloud_Kms_V1_DecryptResponse__getPlaintext__)\nand comparing your results to this field. Discard the response in case of\nnon-matching checksum values, and perform a limited number of retries. A\npersistent mismatch may indicate an issue in your computation of the CRC32C\nchecksum. Note: receiving this response message indicates that\n[KeyManagementService](/php/docs/reference/cloud-kms/latest/V1.Client.KeyManagementServiceClient) is able to\nsuccessfully decrypt the\n[ciphertext](/php/docs/reference/cloud-kms/latest/V1.DecryptRequest#_Google_Cloud_Kms_V1_DecryptRequest__getCiphertext__). Note: This\nfield is defined as int64 for reasons of compatibility across different\nlanguages. However, it is a non-negative integer, which will never exceed\n2\\^32-1, and can be safely downconverted to uint32 in languages that support\nthis type.\n\n### getUsedPrimary\n\nWhether the Decryption was performed using the primary key version.\n\n### setUsedPrimary\n\nWhether the Decryption was performed using the primary key version.\n\n### getProtectionLevel\n\nThe [ProtectionLevel](/php/docs/reference/cloud-kms/latest/V1.ProtectionLevel) of the\n[CryptoKeyVersion](/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion) used in\ndecryption.\n\n### setProtectionLevel\n\nThe [ProtectionLevel](/php/docs/reference/cloud-kms/latest/V1.ProtectionLevel) of the\n[CryptoKeyVersion](/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion) used in\ndecryption."]]