pub struct Aes<'d, T: Instance, M: Mode> { /* private fields */ }Expand description
AES driver.
Implementations§
Source§impl<'d, T: Instance> Aes<'d, T, Blocking>
impl<'d, T: Instance> Aes<'d, T, Blocking>
Sourcepub fn new_blocking(
peripheral: Peri<'d, T>,
_irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd,
) -> Self
pub fn new_blocking( peripheral: Peri<'d, T>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, ) -> Self
Instantiates, resets, and enables the AES peripheral.
Source§impl<'d, T: Instance, M: Mode> Aes<'d, T, M>
impl<'d, T: Instance, M: Mode> Aes<'d, T, M>
Sourcepub fn start<'c, C>(&mut self, cipher: &'c C, dir: Direction) -> Context<'c, C>
pub fn start<'c, C>(&mut self, cipher: &'c C, dir: Direction) -> Context<'c, C>
Starts a new cipher operation and returns the context.
Sourcepub fn aad_blocking<'c, C>(
&mut self,
ctx: &mut Context<'c, C>,
aad: &[u8],
last: bool,
) -> Result<(), Error>where
C: Cipher<'c> + CipherAuthenticated<16>,
pub fn aad_blocking<'c, C>(
&mut self,
ctx: &mut Context<'c, C>,
aad: &[u8],
last: bool,
) -> Result<(), Error>where
C: Cipher<'c> + CipherAuthenticated<16>,
Process authenticated additional data (AAD) for GCM/CCM modes.
Must be called after start and before payload_blocking.
Set last to true for the final AAD block.
Sourcepub fn payload_blocking<'c, C>(
&mut self,
ctx: &mut Context<'c, C>,
input: &[u8],
output: &mut [u8],
last: bool,
) -> Result<(), Error>where
C: Cipher<'c>,
pub fn payload_blocking<'c, C>(
&mut self,
ctx: &mut Context<'c, C>,
input: &[u8],
output: &mut [u8],
last: bool,
) -> Result<(), Error>where
C: Cipher<'c>,
Process payload data in blocking mode.
Set last to true for the final block. Intermediate chunks (last=false)
must be block-aligned (16 bytes). Only the final chunk can be a partial block.
Auto Trait Implementations§
impl<'d, T, M> Freeze for Aes<'d, T, M>where
T: Freeze,
impl<'d, T, M> RefUnwindSafe for Aes<'d, T, M>where
T: RefUnwindSafe,
M: RefUnwindSafe,
impl<'d, T, M> Send for Aes<'d, T, M>where
M: Send,
impl<'d, T, M> Sync for Aes<'d, T, M>
impl<'d, T, M> Unpin for Aes<'d, T, M>
impl<'d, T, M> !UnwindSafe for Aes<'d, T, M>
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