Integrity verification field. A CRC32C checksum of the returnedPublicKey.pem. An integrity check ofPublicKey.pemcan be performed by computing the CRC32C checksum ofPublicKey.pemand 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: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed2^32-1, and can be safely downconverted to uint32 in languages that support this type. NOTE: This field is in Beta.
↳ name
string
Thenameof theCryptoKeyVersionpublic key. Provided here for verification. NOTE: This field is in Beta.
Integrity verification field. A CRC32C checksum of the returnedPublicKey.pem. An integrity check ofPublicKey.pemcan be performed by
computing the CRC32C checksum ofPublicKey.pemand 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: This field is defined as int64 for reasons of compatibility across
different languages. However, it is a non-negative integer, which will
never exceed2^32-1, and can be safely downconverted to uint32 in
languages that support this type.
NOTE: This field is in Beta.
Integrity verification field. A CRC32C checksum of the returnedPublicKey.pem. An integrity check ofPublicKey.pemcan be performed by
computing the CRC32C checksum ofPublicKey.pemand 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: This field is defined as int64 for reasons of compatibility across
different languages. However, it is a non-negative integer, which will
never exceed2^32-1, and can be safely downconverted to uint32 in
languages that support this type.
NOTE: This field is in Beta.
Returns
Type
Description
int|string|null
setPemCrc32C
Integrity verification field. A CRC32C checksum of the returnedPublicKey.pem. An integrity check ofPublicKey.pemcan be performed by
computing the CRC32C checksum ofPublicKey.pemand 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: This field is defined as int64 for reasons of compatibility across
different languages. However, it is a non-negative integer, which will
never exceed2^32-1, and can be safely downconverted to uint32 in
languages that support this type.
NOTE: This field is in Beta.
Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object.
Integrity verification field. A CRC32C checksum of the returnedPublicKey.pem. An integrity check ofPublicKey.pemcan be performed by
computing the CRC32C checksum ofPublicKey.pemand 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: This field is defined as int64 for reasons of compatibility across
different languages. However, it is a non-negative integer, which will
never exceed2^32-1, and can be safely downconverted to uint32 in
languages that support this type.
NOTE: This field is in Beta.
[[["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 PublicKey (2.3.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.3.1 (latest)](/php/docs/reference/cloud-kms/latest/V1.PublicKey)\n- [2.3.0](/php/docs/reference/cloud-kms/2.3.0/V1.PublicKey)\n- [2.2.0](/php/docs/reference/cloud-kms/2.2.0/V1.PublicKey)\n- [2.1.6](/php/docs/reference/cloud-kms/2.1.6/V1.PublicKey)\n- [2.0.0](/php/docs/reference/cloud-kms/2.0.0/V1.PublicKey)\n- [1.23.0](/php/docs/reference/cloud-kms/1.23.0/V1.PublicKey)\n- [1.22.1](/php/docs/reference/cloud-kms/1.22.1/V1.PublicKey)\n- [1.21.4](/php/docs/reference/cloud-kms/1.21.4/V1.PublicKey)\n- [1.20.3](/php/docs/reference/cloud-kms/1.20.3/V1.PublicKey)\n- [1.19.0](/php/docs/reference/cloud-kms/1.19.0/V1.PublicKey)\n- [1.18.1](/php/docs/reference/cloud-kms/1.18.1/V1.PublicKey)\n- [1.17.0](/php/docs/reference/cloud-kms/1.17.0/V1.PublicKey)\n- [1.16.4](/php/docs/reference/cloud-kms/1.16.4/V1.PublicKey)\n- [1.15.3](/php/docs/reference/cloud-kms/1.15.3/V1.PublicKey) \nReference documentation and code samples for the Cloud KMS V1 Client class PublicKey.\n\nThe public keys for a given\n[CryptoKeyVersion](/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion). Obtained via\n[GetPublicKey](/php/docs/reference/cloud-kms/latest/V1.Client.KeyManagementServiceClient#_Google_Cloud_Kms_V1_Client_KeyManagementServiceClient__getPublicKey__).\n\nGenerated from protobuf message `google.cloud.kms.v1.PublicKey`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Kms \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getPem\n\nThe public key, encoded in PEM format. For more information, see the\n[RFC 7468](https://tools.ietf.org/html/rfc7468) sections for\n[General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and\n[Textual Encoding of Subject Public Key Info](https://tools.ietf.org/html/rfc7468#section-13).\n\n### setPem\n\nThe public key, encoded in PEM format. For more information, see the\n[RFC 7468](https://tools.ietf.org/html/rfc7468) sections for\n[General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and\n[Textual Encoding of Subject Public Key Info](https://tools.ietf.org/html/rfc7468#section-13).\n\n### getAlgorithm\n\nThe\n[Algorithm](/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion.CryptoKeyVersionAlgorithm)\nassociated with this key.\n\n### setAlgorithm\n\nThe\n[Algorithm](/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion.CryptoKeyVersionAlgorithm)\nassociated with this key.\n\n### getPemCrc32C\n\nIntegrity verification field. A CRC32C checksum of the returned\n[PublicKey.pem](/php/docs/reference/cloud-kms/latest/V1.PublicKey#_Google_Cloud_Kms_V1_PublicKey__getPem__). An integrity check of\n[PublicKey.pem](/php/docs/reference/cloud-kms/latest/V1.PublicKey#_Google_Cloud_Kms_V1_PublicKey__getPem__) can be performed by\ncomputing the CRC32C checksum of\n[PublicKey.pem](/php/docs/reference/cloud-kms/latest/V1.PublicKey#_Google_Cloud_Kms_V1_PublicKey__getPem__) and comparing your\nresults to this field. Discard the response in case of non-matching\nchecksum values, and perform a limited number of retries. A persistent\nmismatch may indicate an issue in your computation of the CRC32C checksum.\n\nNote: This field is defined as int64 for reasons of compatibility across\ndifferent languages. However, it is a non-negative integer, which will\nnever exceed `2^32-1`, and can be safely downconverted to uint32 in\nlanguages that support this type.\nNOTE: This field is in Beta.\n\n### hasPemCrc32C\n\n### clearPemCrc32C\n\n### getPemCrc32CUnwrapped\n\nReturns the unboxed value from `getPemCrc32C()`\n\nIntegrity verification field. A CRC32C checksum of the returned\n[PublicKey.pem](/php/docs/reference/cloud-kms/latest/V1.PublicKey#_Google_Cloud_Kms_V1_PublicKey__getPem__). An integrity check of\n[PublicKey.pem](/php/docs/reference/cloud-kms/latest/V1.PublicKey#_Google_Cloud_Kms_V1_PublicKey__getPem__) can be performed by\ncomputing the CRC32C checksum of\n[PublicKey.pem](/php/docs/reference/cloud-kms/latest/V1.PublicKey#_Google_Cloud_Kms_V1_PublicKey__getPem__) and comparing your\nresults to this field. Discard the response in case of non-matching\nchecksum values, and perform a limited number of retries. A persistent\nmismatch may indicate an issue in your computation of the CRC32C checksum.\nNote: This field is defined as int64 for reasons of compatibility across\ndifferent languages. However, it is a non-negative integer, which will\nnever exceed `2^32-1`, and can be safely downconverted to uint32 in\nlanguages that support this type.\nNOTE: This field is in Beta.\n\n### setPemCrc32C\n\nIntegrity verification field. A CRC32C checksum of the returned\n[PublicKey.pem](/php/docs/reference/cloud-kms/latest/V1.PublicKey#_Google_Cloud_Kms_V1_PublicKey__getPem__). An integrity check of\n[PublicKey.pem](/php/docs/reference/cloud-kms/latest/V1.PublicKey#_Google_Cloud_Kms_V1_PublicKey__getPem__) can be performed by\ncomputing the CRC32C checksum of\n[PublicKey.pem](/php/docs/reference/cloud-kms/latest/V1.PublicKey#_Google_Cloud_Kms_V1_PublicKey__getPem__) and comparing your\nresults to this field. Discard the response in case of non-matching\nchecksum values, and perform a limited number of retries. A persistent\nmismatch may indicate an issue in your computation of the CRC32C checksum.\n\nNote: This field is defined as int64 for reasons of compatibility across\ndifferent languages. However, it is a non-negative integer, which will\nnever exceed `2^32-1`, and can be safely downconverted to uint32 in\nlanguages that support this type.\nNOTE: This field is in Beta.\n\n### setPemCrc32CUnwrapped\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[PublicKey.pem](/php/docs/reference/cloud-kms/latest/V1.PublicKey#_Google_Cloud_Kms_V1_PublicKey__getPem__). An integrity check of\n[PublicKey.pem](/php/docs/reference/cloud-kms/latest/V1.PublicKey#_Google_Cloud_Kms_V1_PublicKey__getPem__) can be performed by\ncomputing the CRC32C checksum of\n[PublicKey.pem](/php/docs/reference/cloud-kms/latest/V1.PublicKey#_Google_Cloud_Kms_V1_PublicKey__getPem__) and comparing your\nresults to this field. Discard the response in case of non-matching\nchecksum values, and perform a limited number of retries. A persistent\nmismatch may indicate an issue in your computation of the CRC32C checksum.\nNote: This field is defined as int64 for reasons of compatibility across\ndifferent languages. However, it is a non-negative integer, which will\nnever exceed `2^32-1`, and can be safely downconverted to uint32 in\nlanguages that support this type.\nNOTE: This field is in Beta.\n\n### getName\n\nThe [name](/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion#_Google_Cloud_Kms_V1_CryptoKeyVersion__getName__) of the\n[CryptoKeyVersion](/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion) public key.\n\nProvided here for verification.\nNOTE: This field is in Beta.\n\n### setName\n\nThe [name](/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion#_Google_Cloud_Kms_V1_CryptoKeyVersion__getName__) of the\n[CryptoKeyVersion](/php/docs/reference/cloud-kms/latest/V1.CryptoKeyVersion) public key.\n\nProvided here for verification.\nNOTE: This field is in Beta.\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) public key.\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) public key.\n\n### getPublicKeyFormat\n\nThe [PublicKey](/php/docs/reference/cloud-kms/latest/V1.PublicKey) format specified by the\ncustomer through the\n[public_key_format](/php/docs/reference/cloud-kms/latest/V1.GetPublicKeyRequest#_Google_Cloud_Kms_V1_GetPublicKeyRequest__getPublicKeyFormat__)\nfield.\n\n### setPublicKeyFormat\n\nThe [PublicKey](/php/docs/reference/cloud-kms/latest/V1.PublicKey) format specified by the\ncustomer through the\n[public_key_format](/php/docs/reference/cloud-kms/latest/V1.GetPublicKeyRequest#_Google_Cloud_Kms_V1_GetPublicKeyRequest__getPublicKeyFormat__)\nfield.\n\n### getPublicKey\n\nThis field contains the public key (with integrity verification), formatted\naccording to the\n[public_key_format](/php/docs/reference/cloud-kms/latest/V1.PublicKey#_Google_Cloud_Kms_V1_PublicKey__getPublicKeyFormat__) field.\n\n### hasPublicKey\n\n### clearPublicKey\n\n### setPublicKey\n\nThis field contains the public key (with integrity verification), formatted\naccording to the\n[public_key_format](/php/docs/reference/cloud-kms/latest/V1.PublicKey#_Google_Cloud_Kms_V1_PublicKey__getPublicKeyFormat__) field."]]