pub struct AesHw { /* private fields */ }Expand description
Expanded AES round keys for the hardware AES path (AES-128 or AES-256).
Implementations§
Source§impl AesHw
impl AesHw
Sourcepub fn new(round_keys: &[[u8; 16]]) -> Option<AesHw>
pub fn new(round_keys: &[[u8; 16]]) -> Option<AesHw>
Takes the FIPS-197 round keys (11 for AES-128, 15 for AES-256, in the standard byte
order). Returns None if the CPU lacks AES instructions or the count is wrong.
Sourcepub fn encrypt_block(&self, block: &mut [u8; 16])
pub fn encrypt_block(&self, block: &mut [u8; 16])
Encrypts one block in place.
Trait Implementations§
Auto Trait Implementations§
impl Forget for AesHw
impl Freeze for AesHw
impl Move for AesHw
impl RefUnwindSafe for AesHw
impl Send for AesHw
impl Sync for AesHw
impl Unpin for AesHw
impl UnsafeUnpin for AesHw
impl UnwindSafe for AesHw
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