Struct mbedtls::cipher::raw::Cipher[][src]

#[repr(C)]
pub struct Cipher { /* fields omitted */ }

Implementations

impl Cipher[src]

pub fn setup(
    cipher_id: CipherId,
    cipher_mode: CipherMode,
    key_bit_len: u32
) -> Result<Cipher>
[src]

pub fn set_key(&mut self, op: Operation, key: &[u8]) -> Result<()>[src]

pub fn set_padding(&mut self, padding: CipherPadding) -> Result<()>[src]

pub fn set_iv(&mut self, iv: &[u8]) -> Result<()>[src]

pub fn reset(&mut self) -> Result<()>[src]

pub fn update_ad(&mut self, ad: &[u8]) -> Result<()>[src]

pub fn update(&mut self, indata: &[u8], outdata: &mut [u8]) -> Result<usize>[src]

pub fn finish(&mut self, outdata: &mut [u8]) -> Result<usize>[src]

pub fn write_tag(&mut self, tag: &mut [u8]) -> Result<()>[src]

pub fn check_tag(&mut self, tag: &[u8]) -> Result<()>[src]

pub fn block_size(&self) -> usize[src]

pub fn iv_size(&self) -> usize[src]

pub fn cipher_mode(&self) -> CipherMode[src]

pub fn is_authenticated(&self) -> bool[src]

pub fn set_parity(key: &mut [u8]) -> Result<()>[src]

pub fn encrypt(&mut self, plain: &[u8], cipher: &mut [u8]) -> Result<usize>[src]

pub fn decrypt(&mut self, cipher: &[u8], plain: &mut [u8]) -> Result<usize>[src]

pub fn encrypt_auth(
    &mut self,
    ad: &[u8],
    plain: &[u8],
    cipher_and_tag: &mut [u8],
    tag_len: usize
) -> Result<usize>
[src]

pub fn decrypt_auth(
    &mut self,
    ad: &[u8],
    cipher_and_tag: &[u8],
    plain: &mut [u8],
    tag_len: usize
) -> Result<usize>
[src]

pub fn cmac(
    &mut self,
    key: &[u8],
    data: &[u8],
    outdata: &mut [u8]
) -> Result<()>
[src]

Trait Implementations

impl Drop for Cipher[src]

impl<'a> Into<*const cipher_context_t> for &'a Cipher[src]

impl<'a> Into<*mut cipher_context_t> for &'a mut Cipher[src]

impl Send for Cipher[src]

Auto Trait Implementations

impl RefUnwindSafe for Cipher

impl !Sync for Cipher

impl Unpin for Cipher

impl UnwindSafe for Cipher

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.