Struct aws_lc_rs::cipher::DecryptingKey
source · pub struct DecryptingKey { /* private fields */ }Expand description
A cipher decryption key that does not perform block padding.
Implementations§
source§impl DecryptingKey
impl DecryptingKey
sourcepub fn ctr(key: UnboundCipherKey) -> Result<DecryptingKey, Unspecified>
pub fn ctr(key: UnboundCipherKey) -> Result<DecryptingKey, Unspecified>
Constructs a cipher decrypting key operating in counter (CTR) mode using the provided key and context.
Errors
Unspecified: Returned if there is an error during decryption.
sourcepub fn mode(&self) -> OperatingMode
pub fn mode(&self) -> OperatingMode
Returns the cipher operating mode.
sourcepub fn decrypt<'in_out>(
&self,
in_out: &'in_out mut [u8],
context: DecryptionContext
) -> Result<&'in_out mut [u8], Unspecified>
pub fn decrypt<'in_out>( &self, in_out: &'in_out mut [u8], context: DecryptionContext ) -> Result<&'in_out mut [u8], Unspecified>
Decrypts the data provided in in_out in-place.
Returns a references to the decrypted data.
Errors
Unspecified: Returned if cipher mode requires input to be a multiple of the block length, andin_out.len()is not. Also returned if decryption fails.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for DecryptingKey
impl Send for DecryptingKey
impl Sync for DecryptingKey
impl Unpin for DecryptingKey
impl UnwindSafe for DecryptingKey
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