pub struct VirtualAES128CCM<'a, A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB> { /* private fields */ }
Implementations§
source§impl<'a, A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB> VirtualAES128CCM<'a, A>
impl<'a, A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB> VirtualAES128CCM<'a, A>
pub fn new( mux: &'a MuxAES128CCM<'a, A>, crypt_buf: &'static mut [u8], ) -> VirtualAES128CCM<'a, A>
Trait Implementations§
source§impl<'a, A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB> AES128<'a> for VirtualAES128CCM<'a, A>
impl<'a, A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB> AES128<'a> for VirtualAES128CCM<'a, A>
source§fn set_client(&'a self, client: &'a dyn Client<'a>)
fn set_client(&'a self, client: &'a dyn Client<'a>)
Set the client instance which will receive
crypt_done()
callbackssource§fn set_key(&self, key: &[u8]) -> Result<(), ErrorCode>
fn set_key(&self, key: &[u8]) -> Result<(), ErrorCode>
Set the encryption key.
Returns
INVAL
if length is not AES128_KEY_SIZE
source§fn set_iv(&self, iv: &[u8]) -> Result<(), ErrorCode>
fn set_iv(&self, iv: &[u8]) -> Result<(), ErrorCode>
Set the IV (or initial counter).
Returns
INVAL
if length is not AES128_BLOCK_SIZE
source§fn start_message(&self)
fn start_message(&self)
Begin a new message (with the configured IV) when
crypt()
is
next called. Multiple calls to crypt()
may be made between
calls to start_message()
, allowing the encryption context to
extend over non-contiguous extents of data. Read moresource§impl<'a, A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB> AES128CBC for VirtualAES128CCM<'a, A>
impl<'a, A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB> AES128CBC for VirtualAES128CCM<'a, A>
source§impl<'a, A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB> AES128CCM<'a> for VirtualAES128CCM<'a, A>
impl<'a, A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB> AES128CCM<'a> for VirtualAES128CCM<'a, A>
source§fn crypt(
&self,
buf: &'static mut [u8],
a_off: usize,
m_off: usize,
m_len: usize,
mic_len: usize,
confidential: bool,
encrypting: bool,
) -> Result<(), (ErrorCode, &'static mut [u8])>
fn crypt( &self, buf: &'static mut [u8], a_off: usize, m_off: usize, m_len: usize, mic_len: usize, confidential: bool, encrypting: bool, ) -> Result<(), (ErrorCode, &'static mut [u8])>
Try to begin the encryption/decryption process
source§fn set_client(&self, client: &'a dyn CCMClient)
fn set_client(&self, client: &'a dyn CCMClient)
Set the client instance which will receive
crypt_done()
callbackssource§impl<'a, A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB> AES128Ctr for VirtualAES128CCM<'a, A>
impl<'a, A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB> AES128Ctr for VirtualAES128CCM<'a, A>
source§impl<'a, A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB> AES128ECB for VirtualAES128CCM<'a, A>
impl<'a, A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB> AES128ECB for VirtualAES128CCM<'a, A>
source§impl<'a, A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB> Client<'a> for VirtualAES128CCM<'a, A>
impl<'a, A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB> Client<'a> for VirtualAES128CCM<'a, A>
source§impl<'a, A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB> ListNode<'a, VirtualAES128CCM<'a, A>> for VirtualAES128CCM<'a, A>
impl<'a, A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB> ListNode<'a, VirtualAES128CCM<'a, A>> for VirtualAES128CCM<'a, A>
fn next(&'a self) -> &'a ListLink<'a, VirtualAES128CCM<'a, A>>
Auto Trait Implementations§
impl<'a, A> !Freeze for VirtualAES128CCM<'a, A>
impl<'a, A> !RefUnwindSafe for VirtualAES128CCM<'a, A>
impl<'a, A> !Send for VirtualAES128CCM<'a, A>
impl<'a, A> !Sync for VirtualAES128CCM<'a, A>
impl<'a, A> Unpin for VirtualAES128CCM<'a, A>
impl<'a, A> !UnwindSafe for VirtualAES128CCM<'a, A>
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