Trait kernel::hil::symmetric_encryption::AES128CCM
[−]
[src]
pub trait AES128CCM<'a> { fn set_client(&'a self, client: &'a CCMClient); fn set_key(&self, key: &[u8]) -> ReturnCode; fn set_nonce(&self, nonce: &[u8]) -> ReturnCode; fn crypt(
&self,
buf: &'static mut [u8],
a_off: usize,
m_off: usize,
m_len: usize,
mic_len: usize,
confidential: bool,
encrypting: bool
) -> (ReturnCode, Option<&'static mut [u8]>); }
Required Methods
fn set_client(&'a self, client: &'a CCMClient)
Set the client instance which will receive crypt_done()
callbacks
fn set_key(&self, key: &[u8]) -> ReturnCode
Set the key to be used for CCM encryption
fn set_nonce(&self, nonce: &[u8]) -> ReturnCode
Set the nonce (length NONCE_LENGTH) to be used for CCM encryption
fn crypt(
&self,
buf: &'static mut [u8],
a_off: usize,
m_off: usize,
m_len: usize,
mic_len: usize,
confidential: bool,
encrypting: bool
) -> (ReturnCode, Option<&'static mut [u8]>)
&self,
buf: &'static mut [u8],
a_off: usize,
m_off: usize,
m_len: usize,
mic_len: usize,
confidential: bool,
encrypting: bool
) -> (ReturnCode, Option<&'static mut [u8]>)
Try to begin the encryption/decryption process