Skip to main content

TestHmacMd5

Struct TestHmacMd5 

Source
pub struct TestHmacMd5<'a, H: Digest<'a, HMAC_MD5_DIGEST_LEN>> { /* private fields */ }

Implementations§

Source§

impl<'a, H: Digest<'a, HMAC_MD5_DIGEST_LEN> + HmacMd5> TestHmacMd5<'a, H>

Source

pub fn new( hmac: &'a H, key: &'static mut [u8], data: &'static mut [u8], digest: &'static mut [u8; 16], correct: &'static [u8; 16], ) -> Self

Source

pub fn run(&'static self)

Trait Implementations§

Source§

impl<'a, H: Digest<'a, HMAC_MD5_DIGEST_LEN>> CapsuleTest for TestHmacMd5<'a, H>

Source§

fn set_client(&self, client: &'static dyn CapsuleTestClient)

Set the client for the done callback.
Source§

impl<'a, H: Digest<'a, HMAC_MD5_DIGEST_LEN>> ClientData<HMAC_MD5_DIGEST_LEN> for TestHmacMd5<'a, H>

Source§

fn add_data_done( &self, _result: Result<(), ErrorCode>, _data: SubSlice<'static, u8>, )

Called when the data has been added to the digest. Read more
Source§

fn add_mut_data_done( &self, result: Result<(), ErrorCode>, data: SubSliceMut<'static, u8>, )

Called when the data has been added to the digest. Read more
Source§

impl<'a, H: Digest<'a, HMAC_MD5_DIGEST_LEN>> ClientHash<HMAC_MD5_DIGEST_LEN> for TestHmacMd5<'a, H>

Source§

fn hash_done( &self, _result: Result<(), ErrorCode>, digest: &'static mut [u8; 16], )

Called when a digest is computed. Read more
Source§

impl<'a, H: Digest<'a, HMAC_MD5_DIGEST_LEN>> ClientVerify<HMAC_MD5_DIGEST_LEN> for TestHmacMd5<'a, H>

Source§

fn verification_done( &self, _result: Result<bool, ErrorCode>, _compare: &'static mut [u8; 16], )

Called when a verification is computed. Read more

Auto Trait Implementations§

§

impl<'a, H> !Freeze for TestHmacMd5<'a, H>

§

impl<'a, H> !RefUnwindSafe for TestHmacMd5<'a, H>

§

impl<'a, H> !Send for TestHmacMd5<'a, H>

§

impl<'a, H> !Sync for TestHmacMd5<'a, H>

§

impl<'a, H> !UnwindSafe for TestHmacMd5<'a, H>

§

impl<'a, H> Unpin for TestHmacMd5<'a, H>

§

impl<'a, H> UnsafeUnpin for TestHmacMd5<'a, H>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, const DIGEST_LEN: usize> Client<DIGEST_LEN> for T
where T: ClientData<DIGEST_LEN> + ClientHash<DIGEST_LEN> + ClientVerify<DIGEST_LEN>,

Source§

impl<T, const DIGEST_LEN: usize> ClientDataHash<DIGEST_LEN> for T
where T: ClientData<DIGEST_LEN> + ClientHash<DIGEST_LEN>,

Source§

impl<T, const DIGEST_LEN: usize> ClientDataVerify<DIGEST_LEN> for T
where T: ClientData<DIGEST_LEN> + ClientVerify<DIGEST_LEN>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.