#[non_exhaustive]pub struct DecryptResponse {
pub plaintext: Bytes,
pub plaintext_crc32c: Option<Int64Value>,
pub used_primary: bool,
pub protection_level: ProtectionLevel,
/* private fields */
}Expand description
Response message for KeyManagementService.Decrypt.
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.plaintext: BytesThe decrypted data originally supplied in EncryptRequest.plaintext.
plaintext_crc32c: Option<Int64Value>Integrity verification field. A CRC32C checksum of the returned DecryptResponse.plaintext. An integrity check of DecryptResponse.plaintext can be performed by computing the CRC32C checksum of DecryptResponse.plaintext 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: receiving this response message indicates that KeyManagementService is able to successfully decrypt the ciphertext. 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.
used_primary: boolWhether the Decryption was performed using the primary key version.
protection_level: ProtectionLevelThe ProtectionLevel of the CryptoKeyVersion used in decryption.
Implementations§
Source§impl DecryptResponse
impl DecryptResponse
pub fn new() -> Self
Sourcepub fn set_plaintext<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_plaintext<T: Into<Bytes>>(self, v: T) -> Self
Sets the value of plaintext.
Sourcepub fn set_plaintext_crc32c<T>(self, v: T) -> Selfwhere
T: Into<Int64Value>,
pub fn set_plaintext_crc32c<T>(self, v: T) -> Selfwhere
T: Into<Int64Value>,
Sets the value of plaintext_crc32c.
Sourcepub fn set_or_clear_plaintext_crc32c<T>(self, v: Option<T>) -> Selfwhere
T: Into<Int64Value>,
pub fn set_or_clear_plaintext_crc32c<T>(self, v: Option<T>) -> Selfwhere
T: Into<Int64Value>,
Sets or clears the value of plaintext_crc32c.
Sourcepub fn set_used_primary<T: Into<bool>>(self, v: T) -> Self
pub fn set_used_primary<T: Into<bool>>(self, v: T) -> Self
Sets the value of used_primary.
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.
Trait Implementations§
Source§impl Clone for DecryptResponse
impl Clone for DecryptResponse
Source§fn clone(&self) -> DecryptResponse
fn clone(&self) -> DecryptResponse
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more