#[repr(C)]pub struct Cipher { /* private fields */ }
Implementations
sourceimpl Cipher
impl Cipher
pub fn setup(
cipher_id: CipherId,
cipher_mode: CipherMode,
key_bit_len: u32
) -> Result<Cipher>
pub fn set_key(&mut self, op: Operation, key: &[u8]) -> Result<()>
pub fn set_padding(&mut self, padding: CipherPadding) -> Result<()>
pub fn set_iv(&mut self, iv: &[u8]) -> Result<()>
pub fn reset(&mut self) -> Result<()>
pub fn update(&mut self, indata: &[u8], outdata: &mut [u8]) -> Result<usize>
pub fn finish(&mut self, outdata: &mut [u8]) -> Result<usize>
pub fn write_tag(&mut self, tag: &mut [u8]) -> Result<()>
pub fn check_tag(&mut self, tag: &[u8]) -> Result<()>
pub fn block_size(&self) -> usize
pub fn iv_size(&self) -> usize
pub fn is_authenticated(&self) -> bool
pub fn set_parity(key: &mut [u8]) -> Result<()>
pub fn encrypt(&mut self, plain: &[u8], cipher: &mut [u8]) -> Result<usize>
pub fn decrypt(&mut self, cipher: &[u8], plain: &mut [u8]) -> Result<usize>
pub fn encrypt_auth(
&mut self,
ad: &[u8],
plain: &[u8],
cipher: &mut [u8],
tag: &mut [u8]
) -> Result<usize>
pub fn decrypt_auth(
&mut self,
ad: &[u8],
cipher: &[u8],
plain: &mut [u8],
tag: &[u8]
) -> Result<usize>
Trait Implementations
sourceimpl<'a> Into<*const cipher_context_t> for &'a Cipher
impl<'a> Into<*const cipher_context_t> for &'a Cipher
sourcefn into(self) -> *const cipher_context_t
fn into(self) -> *const cipher_context_t
Converts this type into the (usually inferred) input type.
sourceimpl<'a> Into<*mut cipher_context_t> for &'a mut Cipher
impl<'a> Into<*mut cipher_context_t> for &'a mut Cipher
sourcefn into(self) -> *mut cipher_context_t
fn into(self) -> *mut cipher_context_t
Converts this type into the (usually inferred) input type.
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more