Struct capsules::test::aes_ccm::Test
[−]
[src]
pub struct Test<'a, A: AES128CCM<'a> + 'a> { aes_ccm: &'a A, buf: TakeCell<'static, [u8]>, current_test: Cell<usize>, encrypting: Cell<bool>, tests: [(&'static [u8], &'static [u8], &'static [u8], &'static [u8], bool, usize); 3], }
Fields
aes_ccm: &'a A
buf: TakeCell<'static, [u8]>
current_test: Cell<usize>
encrypting: Cell<bool>
tests: [(&'static [u8], &'static [u8], &'static [u8], &'static [u8], bool, usize); 3]
Methods
impl<'a, A: AES128CCM<'a> + 'a> Test<'a, A>
[src]
pub fn new(aes_ccm: &'a A, buf: &'static mut [u8]) -> Test<'a, A>
[src]
pub fn run(&self)
[src]
fn next_test(&self) -> bool
[src]
fn trigger_test(&self)
[src]
fn check_test(&self, tag_is_valid: bool)
[src]
Trait Implementations
impl<'a, A: AES128CCM<'a> + 'a> CCMClient for Test<'a, A>
[src]
fn crypt_done(
&self,
buf: &'static mut [u8],
res: ReturnCode,
tag_is_valid: bool
)
[src]
&self,
buf: &'static mut [u8],
res: ReturnCode,
tag_is_valid: bool
)
res
is SUCCESS if the encryption/decryption process succeeded. This does not mean that the message has been verified in the case of decryption. If we are encrypting: tag_is_valid
is true
iff res
is SUCCESS. If we are decrypting: tag_is_valid
is true
iff res
is SUCCESS and the message authentication tag is valid. Read more