#[non_exhaustive]pub struct PublicKey {
pub pem: String,
pub algorithm: CryptoKeyVersionAlgorithm,
pub pem_crc32c: Option<Int64Value>,
pub name: String,
pub protection_level: ProtectionLevel,
pub public_key_format: PublicKeyFormat,
pub public_key: Option<ChecksummedData>,
/* private fields */
}Expand description
The public keys for a given CryptoKeyVersion. Obtained via GetPublicKey.
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.pem: StringThe 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] (https://tools.ietf.org/html/rfc7468#section-13).
algorithm: CryptoKeyVersionAlgorithmThe Algorithm associated with this key.
pem_crc32c: Option<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: StringThe name of the CryptoKeyVersion public key. Provided here for verification.
NOTE: This field is in Beta.
protection_level: ProtectionLevelThe ProtectionLevel of the CryptoKeyVersion public key.
public_key_format: PublicKeyFormatThe PublicKey format specified by the customer through the public_key_format field.
public_key: Option<ChecksummedData>This field contains the public key (with integrity verification), formatted according to the public_key_format field.
Implementations§
Source§impl PublicKey
impl PublicKey
pub fn new() -> Self
Sourcepub fn set_algorithm<T: Into<CryptoKeyVersionAlgorithm>>(self, v: T) -> Self
pub fn set_algorithm<T: Into<CryptoKeyVersionAlgorithm>>(self, v: T) -> Self
Sets the value of algorithm.
Sourcepub fn set_pem_crc32c<T>(self, v: T) -> Selfwhere
T: Into<Int64Value>,
pub fn set_pem_crc32c<T>(self, v: T) -> Selfwhere
T: Into<Int64Value>,
Sets the value of pem_crc32c.
Sourcepub fn set_or_clear_pem_crc32c<T>(self, v: Option<T>) -> Selfwhere
T: Into<Int64Value>,
pub fn set_or_clear_pem_crc32c<T>(self, v: Option<T>) -> Selfwhere
T: Into<Int64Value>,
Sets or clears the value of pem_crc32c.
Sourcepub fn set_protection_level<T: Into<ProtectionLevel>>(self, v: T) -> Self
pub fn set_protection_level<T: Into<ProtectionLevel>>(self, v: T) -> Self
Sets the value of protection_level.
Sourcepub fn set_public_key_format<T: Into<PublicKeyFormat>>(self, v: T) -> Self
pub fn set_public_key_format<T: Into<PublicKeyFormat>>(self, v: T) -> Self
Sets the value of public_key_format.
Sourcepub fn set_public_key<T>(self, v: T) -> Selfwhere
T: Into<ChecksummedData>,
pub fn set_public_key<T>(self, v: T) -> Selfwhere
T: Into<ChecksummedData>,
Sets the value of public_key.
Sourcepub fn set_or_clear_public_key<T>(self, v: Option<T>) -> Selfwhere
T: Into<ChecksummedData>,
pub fn set_or_clear_public_key<T>(self, v: Option<T>) -> Selfwhere
T: Into<ChecksummedData>,
Sets or clears the value of public_key.