pub struct CipherCtxRef(/* private fields */);Expand description
A borrowed reference to a CipherCtx.
Implementations§
Source§impl CipherCtxRef
impl CipherCtxRef
Sourcepub fn init_encrypt(
&mut self,
cipher: &Cipher,
key: &[u8],
iv: &[u8; 16],
) -> Result<(), ErrorStack>
pub fn init_encrypt( &mut self, cipher: &Cipher, key: &[u8], iv: &[u8; 16], ) -> Result<(), ErrorStack>
Configures CipherCtx for a fresh encryption operation using cipher.
This corresponds to EVP_EncryptInit_ex.
Sourcepub fn init_decrypt(
&mut self,
cipher: &Cipher,
key: &[u8],
iv: &[u8; 16],
) -> Result<(), ErrorStack>
pub fn init_decrypt( &mut self, cipher: &Cipher, key: &[u8], iv: &[u8; 16], ) -> Result<(), ErrorStack>
Configures CipherCtx for a fresh decryption operation using cipher.
This corresponds to EVP_DecryptInit_ex.
Trait Implementations§
Source§impl AsMut<CipherCtxRef> for CipherCtx
impl AsMut<CipherCtxRef> for CipherCtx
Source§fn as_mut(&mut self) -> &mut CipherCtxRef
fn as_mut(&mut self) -> &mut CipherCtxRef
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl AsRef<CipherCtxRef> for CipherCtx
impl AsRef<CipherCtxRef> for CipherCtx
Source§fn as_ref(&self) -> &CipherCtxRef
fn as_ref(&self) -> &CipherCtxRef
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Borrow<CipherCtxRef> for CipherCtx
impl Borrow<CipherCtxRef> for CipherCtx
Source§fn borrow(&self) -> &CipherCtxRef
fn borrow(&self) -> &CipherCtxRef
Immutably borrows from an owned value. Read more
Source§impl BorrowMut<CipherCtxRef> for CipherCtx
impl BorrowMut<CipherCtxRef> for CipherCtx
Source§fn borrow_mut(&mut self) -> &mut CipherCtxRef
fn borrow_mut(&mut self) -> &mut CipherCtxRef
Mutably borrows from an owned value. Read more
Source§impl ForeignTypeRef for CipherCtxRef
impl ForeignTypeRef for CipherCtxRef
Source§type CType = evp_cipher_ctx_st
type CType = evp_cipher_ctx_st
The raw C type.
Source§unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a Self
unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a Self
Constructs a shared instance of this type from its raw type. Read more
impl Send for CipherCtxRef
impl Sync for CipherCtxRef
Auto Trait Implementations§
impl Freeze for CipherCtxRef
impl !RefUnwindSafe for CipherCtxRef
impl Unpin for CipherCtxRef
impl UnsafeUnpin for CipherCtxRef
impl UnwindSafe for CipherCtxRef
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