pub struct PaddedBlockDecryptingKey { /* private fields */ }
Expand description
A cipher decryption key that performs block padding.
Implementations§
Source§impl PaddedBlockDecryptingKey
impl PaddedBlockDecryptingKey
Sourcepub fn cbc_pkcs7(key: UnboundCipherKey) -> Result<Self, Unspecified>
pub fn cbc_pkcs7(key: UnboundCipherKey) -> Result<Self, Unspecified>
Constructs a new PaddedBlockDecryptingKey
cipher with chaining block cipher (CBC) mode.
Decrypted data is unpadded following the PKCS#7 scheme.
§Errors
Unspecified
: Returned if there is an error constructing thePaddedBlockDecryptingKey
.
Sourcepub fn ecb_pkcs7(key: UnboundCipherKey) -> Result<Self, Unspecified>
pub fn ecb_pkcs7(key: UnboundCipherKey) -> Result<Self, Unspecified>
Constructs a new PaddedBlockDecryptingKey
cipher with electronic code book (ECB) mode.
Decrypted data is unpadded following the PKCS#7 scheme.
§☠️ ️️️DANGER ☠️
Offered for computability purposes only. This is an extremely dangerous mode, and very likely not what you want to use.
§Errors
Unspecified
: Returned if there is an error constructing thePaddedBlockDecryptingKey
.
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 and unpads data provided in in_out
in-place.
Returns a references to the decrypted data.
§Errors
Unspecified
: Returned if decryption fails.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PaddedBlockDecryptingKey
impl RefUnwindSafe for PaddedBlockDecryptingKey
impl Send for PaddedBlockDecryptingKey
impl Sync for PaddedBlockDecryptingKey
impl Unpin for PaddedBlockDecryptingKey
impl UnwindSafe for PaddedBlockDecryptingKey
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