Google Cloud Binary Authorization V1 Client - Class PkixPublicKey (1.2.0)

Reference documentation and code samples for the Google Cloud Binary Authorization V1 Client class PkixPublicKey.

A public key in the PkixPublicKey format. Public keys of this type are typically textually encoded using the PEM format.

Generated from protobuf message google.cloud.binaryauthorization.v1.PkixPublicKey

Namespace

Google \ Cloud \ BinaryAuthorization \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ public_key_pem string

A PEM-encoded public key, as described in https://tools.ietf.org/html/rfc7468#section-13

↳ signature_algorithm int

The signature algorithm used to verify a message against a signature using this key. These signature algorithm must match the structure and any object identifiers encoded in public_key_pem (i.e. this algorithm must match that of the public key).

↳ key_id string

Optional. The ID of this public key. Signatures verified by Binary Authorization must include the ID of the public key that can be used to verify them. The ID must match exactly contents of the key_id field exactly. The ID may be explicitly provided by the caller, but it MUST be a valid RFC3986 URI. If key_id is left blank and this PkixPublicKey is not used in the context of a wrapper (see next paragraph), a default key ID will be computed based on the digest of the DER encoding of the public key. If this PkixPublicKey is used in the context of a wrapper that has its own notion of key ID (e.g. AttestorPublicKey), then this field can either match that value exactly, or be left blank, in which case it behaves exactly as though it is equal to that wrapper value.

getPublicKeyPem

A PEM-encoded public key, as described in https://tools.ietf.org/html/rfc7468#section-13

Returns
Type Description
string

setPublicKeyPem

A PEM-encoded public key, as described in https://tools.ietf.org/html/rfc7468#section-13

Parameter
Name Description
var string
Returns
Type Description
$this

getSignatureAlgorithm

The signature algorithm used to verify a message against a signature using this key.

These signature algorithm must match the structure and any object identifiers encoded in public_key_pem (i.e. this algorithm must match that of the public key).

Returns
Type Description
int Enum of type SignatureAlgorithm.

setSignatureAlgorithm

The signature algorithm used to verify a message against a signature using this key.

These signature algorithm must match the structure and any object identifiers encoded in public_key_pem (i.e. this algorithm must match that of the public key).

Parameter
Name Description
var int

Enum of type SignatureAlgorithm.

Returns
Type Description
$this

getKeyId

Optional. The ID of this public key.

Signatures verified by Binary Authorization must include the ID of the public key that can be used to verify them. The ID must match exactly contents of the key_id field exactly. The ID may be explicitly provided by the caller, but it MUST be a valid RFC3986 URI. If key_id is left blank and this PkixPublicKey is not used in the context of a wrapper (see next paragraph), a default key ID will be computed based on the digest of the DER encoding of the public key. If this PkixPublicKey is used in the context of a wrapper that has its own notion of key ID (e.g. AttestorPublicKey), then this field can either match that value exactly, or be left blank, in which case it behaves exactly as though it is equal to that wrapper value.

Returns
Type Description
string

setKeyId

Optional. The ID of this public key.

Signatures verified by Binary Authorization must include the ID of the public key that can be used to verify them. The ID must match exactly contents of the key_id field exactly. The ID may be explicitly provided by the caller, but it MUST be a valid RFC3986 URI. If key_id is left blank and this PkixPublicKey is not used in the context of a wrapper (see next paragraph), a default key ID will be computed based on the digest of the DER encoding of the public key. If this PkixPublicKey is used in the context of a wrapper that has its own notion of key ID (e.g. AttestorPublicKey), then this field can either match that value exactly, or be left blank, in which case it behaves exactly as though it is equal to that wrapper value.

Parameter
Name Description
var string
Returns
Type Description
$this