Struct secured_cipher::Cipher
source · pub struct Cipher { /* private fields */ }Expand description
The Cipher struct provides a common interface for cryptographic operations,
specifically focusing on encryption and decryption.
Implementations§
source§impl Cipher
impl Cipher
sourcepub fn new(mode: CipherMode) -> Self
pub fn new(mode: CipherMode) -> Self
sourcepub fn sign(&mut self, header: &[u8], data: &[u8]) -> SignedEnvelope
pub fn sign(&mut self, header: &[u8], data: &[u8]) -> SignedEnvelope
sourcepub fn decrypt_and_verify(
&mut self,
envelope: &SignedEnvelope
) -> Result<Vec<u8>, CipherError>
pub fn decrypt_and_verify( &mut self, envelope: &SignedEnvelope ) -> Result<Vec<u8>, CipherError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Cipher
impl !Send for Cipher
impl !Sync for Cipher
impl Unpin for Cipher
impl !UnwindSafe for Cipher
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