pub struct Sm4Ccm<A: AsRef<[u8]>> { /* private fields */ }
Implementations
sourceimpl<A: AsRef<[u8]>> Sm4Ccm<A>
impl<A: AsRef<[u8]>> Sm4Ccm<A>
pub fn new(key: &Key128bit, iv: Nonce, aad: Aad<A>) -> SgxResult<Sm4Ccm<A>>
pub fn encrypt(&mut self, src: &[u8], dst: &mut [u8]) -> SgxResult<Mac128bit>
pub fn encrypt_in_place(&mut self, in_out: &mut [u8]) -> SgxResult<Mac128bit>
pub fn decrypt(&mut self, src: &[u8], dst: &mut [u8], mac: &Mac128bit) -> SgxResult
pub fn decrypt_in_place(
&mut self,
in_out: &mut [u8],
mac: &Mac128bit
) -> SgxResult
pub fn mac(&mut self) -> SgxResult<Mac128bit>
pub fn verify_mac(&mut self, mac: &Mac128bit) -> SgxResult
pub fn enc_update(&mut self, src: &[u8], dst: &mut [u8]) -> SgxResult
pub fn enc_update_in_place(&mut self, in_out: &mut [u8]) -> SgxResult
pub unsafe fn dec_update(&mut self, src: &[u8], dst: &mut [u8]) -> SgxResult
pub unsafe fn dec_update_in_place(&mut self, in_out: &mut [u8]) -> SgxResult
pub fn enc_get_mac(&mut self) -> SgxResult<Mac128bit>
pub fn dec_verify_mac(&mut self, mac: &Mac128bit) -> SgxResult
Trait Implementations
Auto Trait Implementations
impl<A> RefUnwindSafe for Sm4Ccm<A>where
A: RefUnwindSafe,
impl<A> !Send for Sm4Ccm<A>
impl<A> !Sync for Sm4Ccm<A>
impl<A> Unpin for Sm4Ccm<A>where
A: Unpin,
impl<A> UnwindSafe for Sm4Ccm<A>where
A: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more