Struct capsules_extra::sip_hash::SipHasher24

source ·
pub struct SipHasher24<'a> { /* private fields */ }

Implementations§

source§

impl<'a> SipHasher24<'a>

source

pub fn new() -> Self

source

pub fn new_with_keys(k0: u64, k1: u64) -> Self

Trait Implementations§

source§

impl<'a> DeferredCallClient for SipHasher24<'a>

source§

fn handle_deferred_call(&self)

Software interrupt function that is called when the deferred call is triggered.
source§

fn register(&'static self)

source§

impl<'a> Hasher<'a, 8> for SipHasher24<'a>

source§

fn set_client(&'a self, client: &'a dyn Client<8>)

Set the client instance which will receive hash_done() and add_data_done() callbacks. This callback is called when the data has been added to the hash engine. The callback should follow the Client add_data_done callback.
source§

fn add_data( &self, data: SubSlice<'static, u8>, ) -> Result<usize, (ErrorCode, SubSlice<'static, u8>)>

Add data to the hash block. This is the data that will be used for the hash function. Returns the number of bytes parsed on success There is no guarantee the data has been written until the add_data_done() callback is fired. On error the return value will contain a return code and the original data The possible ErrorCodes are: Read more
source§

fn add_mut_data( &self, data: SubSliceMut<'static, u8>, ) -> Result<usize, (ErrorCode, SubSliceMut<'static, u8>)>

Add data to the hash block. This is the data that will be used for the hash function. Returns the number of bytes parsed on success There is no guarantee the data has been written until the add_data_done() callback is fired. On error the return value will contain a return code and the original data The possible ErrorCodes are: Read more
source§

fn run( &'a self, digest: &'static mut [u8; 8], ) -> Result<(), (ErrorCode, &'static mut [u8; 8])>

Request the implementation to generate a hash and stores the returned hash in the memory location specified. This doesn’t return any data, instead the client needs to have set a hash_done handler to determine when this is complete. On error the return value will contain a return code and the original data If there is data from the add_data() command asyncrously waiting to be written it will be written before the operation starts. The possible ErrorCodes are: Read more
source§

fn clear_data(&self)

Clear the internal state of the engine. This won’t clear the buffers provided to this API, that is up to the user to clear.
source§

impl<'a> SipHash for SipHasher24<'a>

source§

fn set_keys(&self, k0: u64, k1: u64) -> Result<(), ErrorCode>

Optionaly call before Hasher::run() to specify the keys used The possible ErrorCodes are: Read more

Auto Trait Implementations§

§

impl<'a> !Freeze for SipHasher24<'a>

§

impl<'a> !RefUnwindSafe for SipHasher24<'a>

§

impl<'a> !Send for SipHasher24<'a>

§

impl<'a> !Sync for SipHasher24<'a>

§

impl<'a> Unpin for SipHasher24<'a>

§

impl<'a> !UnwindSafe for SipHasher24<'a>

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> 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>,

§

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>,

§

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.