#[non_exhaustive]pub struct PkixPublicKey {
pub public_key_pem: String,
pub signature_algorithm: SignatureAlgorithm,
pub key_id: String,
/* private fields */
}Expand description
A public key in the PkixPublicKey format. Public keys of this type are typically textually encoded using the PEM format.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.public_key_pem: StringA PEM-encoded public key, as described in https://tools.ietf.org/html/rfc7468#section-13
signature_algorithm: SignatureAlgorithmThe 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: StringOptional. 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.
Implementations§
Source§impl PkixPublicKey
impl PkixPublicKey
Sourcepub fn set_public_key_pem<T: Into<String>>(self, v: T) -> Self
pub fn set_public_key_pem<T: Into<String>>(self, v: T) -> Self
Sets the value of public_key_pem.
§Example
let x = PkixPublicKey::new().set_public_key_pem("example");Sourcepub fn set_signature_algorithm<T: Into<SignatureAlgorithm>>(self, v: T) -> Self
pub fn set_signature_algorithm<T: Into<SignatureAlgorithm>>(self, v: T) -> Self
Sets the value of signature_algorithm.
§Example
use google_cloud_binaryauthorization_v1::model::pkix_public_key::SignatureAlgorithm;
let x0 = PkixPublicKey::new().set_signature_algorithm(SignatureAlgorithm::RsaPss2048Sha256);
let x1 = PkixPublicKey::new().set_signature_algorithm(SignatureAlgorithm::RsaSignPss2048Sha256);
let x2 = PkixPublicKey::new().set_signature_algorithm(SignatureAlgorithm::RsaPss3072Sha256);Trait Implementations§
Source§impl Clone for PkixPublicKey
impl Clone for PkixPublicKey
Source§fn clone(&self) -> PkixPublicKey
fn clone(&self) -> PkixPublicKey
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more