Struct esp32c3_hal::rsa::RsaMultiplication
source · pub struct RsaMultiplication<'a, 'd, T>where
T: RsaMode + Multi,{ /* private fields */ }
Expand description
Support for RSA peripheral’s large number multiplication feature that could
be used to find the operand a * operand b
.
Each operand is a little endian byte array of the same size
Implementations§
source§impl<'a, 'd, T, const N: usize> RsaMultiplication<'a, 'd, T>where
T: RsaMode<InputType = [u8; N]> + Multi + RsaMode,
impl<'a, 'd, T, const N: usize> RsaMultiplication<'a, 'd, T>where T: RsaMode<InputType = [u8; N]> + Multi + RsaMode,
sourcepub fn new(
rsa: &'a mut Rsa<'d>,
operand_a: &<T as RsaMode>::InputType
) -> RsaMultiplication<'a, 'd, T>
pub fn new( rsa: &'a mut Rsa<'d>, operand_a: &<T as RsaMode>::InputType ) -> RsaMultiplication<'a, 'd, T>
Creates an Instance of RsaMultiplication
.
sourcepub fn start_multiplication(&mut self, operand_b: &<T as RsaMode>::InputType)
pub fn start_multiplication(&mut self, operand_b: &<T as RsaMode>::InputType)
Starts the multiplication operation.
source§impl<'a, 'd, T, const N: usize> RsaMultiplication<'a, 'd, T>where
T: RsaMode<InputType = [u8; N]> + Multi + RsaMode,
impl<'a, 'd, T, const N: usize> RsaMultiplication<'a, 'd, T>where T: RsaMode<InputType = [u8; N]> + Multi + RsaMode,
sourcepub fn read_results<const O: usize, 'b>(
&mut self,
outbuf: &mut <T as Multi>::OutputType
)where
T: Multi<OutputType = [u8; O]>,
pub fn read_results<const O: usize, 'b>( &mut self, outbuf: &mut <T as Multi>::OutputType )where T: Multi<OutputType = [u8; O]>,
Reads the result to the given buffer.
This is a non blocking function that returns without an error if
operation is completed successfully. start_multiplication
must be
called before calling this function.
Auto Trait Implementations§
impl<'a, 'd, T> RefUnwindSafe for RsaMultiplication<'a, 'd, T>where T: RefUnwindSafe,
impl<'a, 'd, T> Send for RsaMultiplication<'a, 'd, T>where T: Send,
impl<'a, 'd, T> Sync for RsaMultiplication<'a, 'd, T>where T: Sync,
impl<'a, 'd, T> Unpin for RsaMultiplication<'a, 'd, T>where T: Unpin,
impl<'a, 'd, T> !UnwindSafe for RsaMultiplication<'a, 'd, T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more