Cloud KMS V1 Client - Class PublicKey (1.23.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
Name Description
data array

Optional. Data for populating the Message object.

↳ pem string

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.

↳ algorithm int

The Algorithm associated with this key.

↳ pem_crc32c Google\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.

↳ name string

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

↳ protection_level int

The ProtectionLevel of the CryptoKeyVersion public key.

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
Type Description
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
Name Description
var string
Returns
Type Description
$this

getAlgorithm

The Algorithm associated with this key.

Returns
Type Description
int

setAlgorithm

The Algorithm associated with this key.

Parameter
Name Description
var int
Returns
Type Description
$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
Type Description
Google\Protobuf\Int64Value|null

hasPemCrc32C

clearPemCrc32C

getPemCrc32CValue

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
Type Description
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
Name Description
var Google\Protobuf\Int64Value
Returns
Type Description
$this

setPemCrc32CValue

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
Name Description
var int|string|null
Returns
Type Description
$this

getName

The name of the CryptoKeyVersion public key.

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

Returns
Type Description
string

setName

The name of the CryptoKeyVersion public key.

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

Parameter
Name Description
var string
Returns
Type Description
$this

getProtectionLevel

The ProtectionLevel of the CryptoKeyVersion public key.

Returns
Type Description
int

setProtectionLevel

The ProtectionLevel of the CryptoKeyVersion public key.

Parameter
Name Description
var int
Returns
Type Description
$this