#[non_exhaustive]pub struct DecryptRequest {
pub name: String,
pub ciphertext: Bytes,
pub additional_authenticated_data: Bytes,
pub ciphertext_crc32c: Option<Int64Value>,
pub additional_authenticated_data_crc32c: Option<Int64Value>,
/* private fields */
}Expand description
Request 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.name: StringRequired. The resource name of the CryptoKey to use for decryption. The server will choose the appropriate version.
ciphertext: BytesRequired. The encrypted data originally returned in EncryptResponse.ciphertext.
additional_authenticated_data: BytesOptional. Optional data that must match the data originally supplied in EncryptRequest.additional_authenticated_data.
ciphertext_crc32c: Option<Int64Value>Optional. An optional CRC32C checksum of the DecryptRequest.ciphertext. If specified, KeyManagementService will verify the integrity of the received DecryptRequest.ciphertext using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify that CRC32C(DecryptRequest.ciphertext) is equal to DecryptRequest.ciphertext_crc32c, and if so, 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.
additional_authenticated_data_crc32c: Option<Int64Value>Optional. An optional CRC32C checksum of the DecryptRequest.additional_authenticated_data. If specified, KeyManagementService will verify the integrity of the received DecryptRequest.additional_authenticated_data using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify that CRC32C(DecryptRequest.additional_authenticated_data) is equal to DecryptRequest.additional_authenticated_data_crc32c, and if so, 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.
Implementations§
Source§impl DecryptRequest
impl DecryptRequest
Sourcepub fn set_ciphertext<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_ciphertext<T: Into<Bytes>>(self, v: T) -> Self
Sets the value of ciphertext.
§Example
let x = DecryptRequest::new().set_ciphertext(bytes::Bytes::from_static(b"example"));Sourcepub fn set_additional_authenticated_data<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_additional_authenticated_data<T: Into<Bytes>>(self, v: T) -> Self
Sets the value of additional_authenticated_data.
§Example
let x = DecryptRequest::new().set_additional_authenticated_data(bytes::Bytes::from_static(b"example"));Sourcepub fn set_ciphertext_crc32c<T>(self, v: T) -> Selfwhere
T: Into<Int64Value>,
pub fn set_ciphertext_crc32c<T>(self, v: T) -> Selfwhere
T: Into<Int64Value>,
Sets the value of ciphertext_crc32c.
§Example
use wkt::Int64Value;
let x = DecryptRequest::new().set_ciphertext_crc32c(Int64Value::default()/* use setters */);Sourcepub fn set_or_clear_ciphertext_crc32c<T>(self, v: Option<T>) -> Selfwhere
T: Into<Int64Value>,
pub fn set_or_clear_ciphertext_crc32c<T>(self, v: Option<T>) -> Selfwhere
T: Into<Int64Value>,
Sets or clears the value of ciphertext_crc32c.
§Example
use wkt::Int64Value;
let x = DecryptRequest::new().set_or_clear_ciphertext_crc32c(Some(Int64Value::default()/* use setters */));
let x = DecryptRequest::new().set_or_clear_ciphertext_crc32c(None::<Int64Value>);Sourcepub fn set_additional_authenticated_data_crc32c<T>(self, v: T) -> Selfwhere
T: Into<Int64Value>,
pub fn set_additional_authenticated_data_crc32c<T>(self, v: T) -> Selfwhere
T: Into<Int64Value>,
Sets the value of additional_authenticated_data_crc32c.
§Example
use wkt::Int64Value;
let x = DecryptRequest::new().set_additional_authenticated_data_crc32c(Int64Value::default()/* use setters */);Sourcepub fn set_or_clear_additional_authenticated_data_crc32c<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<Int64Value>,
pub fn set_or_clear_additional_authenticated_data_crc32c<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<Int64Value>,
Sets or clears the value of additional_authenticated_data_crc32c.
§Example
use wkt::Int64Value;
let x = DecryptRequest::new().set_or_clear_additional_authenticated_data_crc32c(Some(Int64Value::default()/* use setters */));
let x = DecryptRequest::new().set_or_clear_additional_authenticated_data_crc32c(None::<Int64Value>);Trait Implementations§
Source§impl Clone for DecryptRequest
impl Clone for DecryptRequest
Source§fn clone(&self) -> DecryptRequest
fn clone(&self) -> DecryptRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DecryptRequest
impl Debug for DecryptRequest
Source§impl Default for DecryptRequest
impl Default for DecryptRequest
Source§fn default() -> DecryptRequest
fn default() -> DecryptRequest
Source§impl Message for DecryptRequest
impl Message for DecryptRequest
Source§impl PartialEq for DecryptRequest
impl PartialEq for DecryptRequest
impl StructuralPartialEq for DecryptRequest
Auto Trait Implementations§
impl !Freeze for DecryptRequest
impl RefUnwindSafe for DecryptRequest
impl Send for DecryptRequest
impl Sync for DecryptRequest
impl Unpin for DecryptRequest
impl UnsafeUnpin for DecryptRequest
impl UnwindSafe for DecryptRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request