Cloud KMS V1 Client - Class PublicKey (1.15.3)

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

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

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

Methods

__construct

Constructor.

Parameters
NameDescription
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
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
var string
Returns
TypeDescription
$this

getAlgorithm

The Algorithm associated with this key.

Returns
TypeDescription
int

setAlgorithm

The Algorithm associated with this key.

Parameter
NameDescription
var int
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

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
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
var Google\Protobuf\Int64Value
Returns
TypeDescription
$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
NameDescription
var int|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
var string
Returns
TypeDescription
$this

getProtectionLevel

The ProtectionLevel of the CryptoKeyVersion public key.

Returns
TypeDescription
int

setProtectionLevel

The ProtectionLevel of the CryptoKeyVersion public key.

Parameter
NameDescription
var int
Returns
TypeDescription
$this