pub trait Client<const L: usize> {
fn add_data_done(&self, result: Result<(), ErrorCode>, data: &'static [u8]);
fn add_mut_data_done(
&self,
result: Result<(), ErrorCode>,
data: &'static mut [u8]
);
fn hash_done(
&self,
result: Result<(), ErrorCode>,
hash: &'static mut [u8; L]
);
}
Expand description
Implement this trait and use set_client()
in order to receive callbacks.
‘L’ is the length of the ‘u8’ array to store the hash output.
Required Methods
This callback is called when the data has been added to the hash
engine.
On error or success data
will contain a reference to the original
data supplied to add_data()
.
The possible ErrorCodes are:
- SIZE: The size of the
data
buffer is invalid
This callback is called when the data has been added to the hash
engine.
On error or success data
will contain a reference to the original
data supplied to add_mut_data()
.
The possible ErrorCodes are:
- SIZE: The size of the
data
buffer is invalid