Cloud KMS V1 Client - Class PublicKey (2.2.0)

Reference documentation and code samples for the Cloud KMS V1 Client class PublicKey.

The public keys for a given CryptoKeyVersion. Obtained via GetPublicKey.

Generated from protobuf message google.cloud.kms.v1.PublicKey

Namespace

Google \ Cloud \ Kms \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
dataarray

Optional. Data for populating the Message object.

↳ pemstring

The public key, encoded in PEM format. For more information, see the RFC 7468 sections for General Considerations and Textual Encoding of Subject Public Key Info.

↳ algorithmint

The Algorithm associated with this key.

↳ pem_crc32cGoogle\Protobuf\Int64Value

Integrity verification field. A CRC32C checksum of the returned PublicKey.pem. An integrity check of PublicKey.pem can be performed by computing the CRC32C checksum of PublicKey.pem and 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 exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type. NOTE: This field is in Beta.

↳ namestring

The name of the CryptoKeyVersion public key. Provided here for verification. NOTE: This field is in Beta.

↳ protection_levelint

The ProtectionLevel of the CryptoKeyVersion public key.

↳ public_key_formatint

The PublicKey format specified by the customer through the public_key_format field.

↳ public_keyChecksummedData

This field contains the public key (with integrity verification), formatted according to the public_key_format field.

getPem

The public key, encoded in PEM format. For more information, see the RFC 7468 sections for General Considerations and Textual Encoding of Subject Public Key Info.

Returns
TypeDescription
string

setPem

The public key, encoded in PEM format. For more information, see the RFC 7468 sections for General Considerations and Textual Encoding of Subject Public Key Info.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getAlgorithm

The Algorithm associated with this key.

Returns
TypeDescription
int

setAlgorithm

The Algorithm associated with this key.

Parameter
NameDescription
varint
Returns
TypeDescription
$this

getPemCrc32C

Integrity verification field. A CRC32C checksum of the returned PublicKey.pem. An integrity check of PublicKey.pem can be performed by computing the CRC32C checksum of PublicKey.pem and 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 exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type. NOTE: This field is in Beta.

Returns
TypeDescription
Google\Protobuf\Int64Value|null

hasPemCrc32C

clearPemCrc32C

getPemCrc32CUnwrapped

Returns the unboxed value from getPemCrc32C()

Integrity verification field. A CRC32C checksum of the returned PublicKey.pem. An integrity check of PublicKey.pem can be performed by computing the CRC32C checksum of PublicKey.pem and 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 exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type. NOTE: This field is in Beta.

Returns
TypeDescription
int|string|null

setPemCrc32C

Integrity verification field. A CRC32C checksum of the returned PublicKey.pem. An integrity check of PublicKey.pem can be performed by computing the CRC32C checksum of PublicKey.pem and 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 exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type. NOTE: This field is in Beta.

Parameter
NameDescription
varGoogle\Protobuf\Int64Value
Returns
TypeDescription
$this

setPemCrc32CUnwrapped

Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object.

Integrity verification field. A CRC32C checksum of the returned PublicKey.pem. An integrity check of PublicKey.pem can be performed by computing the CRC32C checksum of PublicKey.pem and 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 exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type. NOTE: This field is in Beta.

Parameter
NameDescription
varint|string|null
Returns
TypeDescription
$this

getName

The name of the CryptoKeyVersion public key.

Provided here for verification. NOTE: This field is in Beta.

Returns
TypeDescription
string

setName

The name of the CryptoKeyVersion public key.

Provided here for verification. NOTE: This field is in Beta.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getProtectionLevel

The ProtectionLevel of the CryptoKeyVersion public key.

Returns
TypeDescription
int

setProtectionLevel

The ProtectionLevel of the CryptoKeyVersion public key.

Parameter
NameDescription
varint
Returns
TypeDescription
$this

getPublicKeyFormat

The PublicKey format specified by the customer through the public_key_format field.

Returns
TypeDescription
int

setPublicKeyFormat

The PublicKey format specified by the customer through the public_key_format field.

Parameter
NameDescription
varint
Returns
TypeDescription
$this

getPublicKey

This field contains the public key (with integrity verification), formatted according to the public_key_format field.

Returns
TypeDescription
ChecksummedData|null

hasPublicKey

clearPublicKey

setPublicKey

This field contains the public key (with integrity verification), formatted according to the public_key_format field.

Parameter
NameDescription
varChecksummedData
Returns
TypeDescription
$this