Struct stm32l0xx_hal::aes::Stream
source · [−]Expand description
An active encryption/decryption stream
You can get an instance of this struct by calling AES::enable
.
Fields
tx: Tx
Can be used to write data to the AES peripheral
rx: Rx
Can be used to read data from the AES peripheral
Implementations
sourceimpl Stream
impl Stream
sourcepub fn process(&mut self, input: &Block) -> Result<Block, Error>
pub fn process(&mut self, input: &Block) -> Result<Block, Error>
Processes one block of data
Writes one block of data to the AES peripheral, wait until it is processed then reads the processed block and returns it.
Whether this is encryption or decryption depends on the mode that was
selected when this Stream
was created.
sourcepub fn disable(self) -> AES
pub fn disable(self) -> AES
Disable the AES peripheral
Consumes the stream and returns the disabled AES
instance. Call this
method when you’re done encrypting/decrypting data. You can then create
another Stream
using AES::enable
.
Auto Trait Implementations
impl RefUnwindSafe for Stream
impl Send for Stream
impl !Sync for Stream
impl Unpin for Stream
impl UnwindSafe for Stream
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more