pub struct KeyAes256 { /* private fields */ }Expand description
KeyAes256 represents an AES-256 encryption key used with the Customer-Supplied Encryption Keys (CSEK) feature.
This key must be exactly 32 bytes in length and should be provided in its raw (unencoded) byte format.
§Examples
Creating a KeyAes256 instance from a valid byte slice:
let raw_key_bytes: [u8; 32] = [0x42; 32]; // Example 32-byte key
let key_aes_256 = KeyAes256::new(&raw_key_bytes)?;Handling an error for an invalid key length:
let invalid_key_bytes: &[u8] = b"too_short_key"; // Less than 32 bytes
let result = KeyAes256::new(invalid_key_bytes);
assert!(matches!(result, Err(KeyAes256Error::InvalidLength)));Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyAes256
impl RefUnwindSafe for KeyAes256
impl Send for KeyAes256
impl Sync for KeyAes256
impl Unpin for KeyAes256
impl UnwindSafe for KeyAes256
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Wrap the input message
T in a tonic::RequestSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.