pub struct RsaMultiplication<'a, 'd, T, Dm>{ /* 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, Dm, const N: usize> RsaMultiplication<'a, 'd, T, Dm>
impl<'a, 'd, T, Dm, const N: usize> RsaMultiplication<'a, 'd, T, Dm>
Sourcepub fn new(rsa: &'a mut Rsa<'d, Dm>, operand_a: &T::InputType) -> Self
pub fn new(rsa: &'a mut Rsa<'d, Dm>, operand_a: &T::InputType) -> Self
Creates an instance of RsaMultiplication.
Sourcepub fn start_multiplication(&mut self, operand_b: &T::InputType)
pub fn start_multiplication(&mut self, operand_b: &T::InputType)
Starts the multiplication operation.
Sourcepub fn read_results<const O: usize>(&mut self, outbuf: &mut T::OutputType)
pub fn read_results<const O: usize>(&mut self, outbuf: &mut T::OutputType)
Reads the result to the given buffer.
This is a blocking function: it waits for the RSA operation to complete,
then reads the results into the provided buffer. start_multiplication must be
called before calling this function.
Source§impl<T, const N: usize> RsaMultiplication<'_, '_, T, Async>
impl<T, const N: usize> RsaMultiplication<'_, '_, T, Async>
Sourcepub async fn multiplication<const O: usize>(
&mut self,
operand_b: &T::InputType,
outbuf: &mut T::OutputType,
)
pub async fn multiplication<const O: usize>( &mut self, operand_b: &T::InputType, outbuf: &mut T::OutputType, )
Asynchronously performs an RSA multiplication operation.
Auto Trait Implementations§
impl<'a, 'd, T, Dm> Freeze for RsaMultiplication<'a, 'd, T, Dm>
impl<'a, 'd, T, Dm> RefUnwindSafe for RsaMultiplication<'a, 'd, T, Dm>where
T: RefUnwindSafe,
Dm: RefUnwindSafe,
impl<'a, 'd, T, Dm> Send for RsaMultiplication<'a, 'd, T, Dm>
impl<'a, 'd, T, Dm> Sync for RsaMultiplication<'a, 'd, T, Dm>
impl<'a, 'd, T, Dm> Unpin for RsaMultiplication<'a, 'd, T, Dm>where
T: Unpin,
impl<'a, 'd, T, Dm> !UnwindSafe for RsaMultiplication<'a, 'd, T, Dm>
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