pub struct Cipher(/* private fields */);
Implementations§
Source§impl Cipher
impl Cipher
pub unsafe fn from_raw(raw: gcry_cipher_hd_t) -> Self
pub fn as_raw(&self) -> gcry_cipher_hd_t
pub fn into_raw(self) -> gcry_cipher_hd_t
pub fn new(algo: Algorithm, mode: Mode) -> Result<Cipher>
pub fn with_flags(algo: Algorithm, mode: Mode, flags: Flags) -> Result<Cipher>
pub fn set_key(&mut self, key: impl AsRef<[u8]>) -> Result<()>
pub fn set_iv(&mut self, iv: impl AsRef<[u8]>) -> Result<()>
pub fn set_ctr(&mut self, ctr: impl AsRef<[u8]>) -> Result<()>
pub fn reset(&mut self) -> Result<()>
pub fn authenticate(&mut self, bytes: &[u8]) -> Result<()>
pub fn get_tag(&mut self, tag: &mut [u8]) -> Result<()>
pub fn verify_tag(&mut self, tag: &[u8]) -> Result<()>
pub fn encrypt(&mut self, input: &[u8], output: &mut [u8]) -> Result<()>
pub fn decrypt(&mut self, input: &[u8], output: &mut [u8]) -> Result<()>
pub fn encrypt_inplace(&mut self, buffer: &mut [u8]) -> Result<()>
pub fn decrypt_inplace(&mut self, buffer: &mut [u8]) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cipher
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