Struct nrf52832::aes::AesECB

source ·
pub struct AesECB<'a> { /* private fields */ }

Implementations§

source§

impl<'a> AesECB<'a>

source

pub const fn new() -> AesECB<'a>

source

pub fn handle_interrupt(&self)

AesEcb Interrupt handler

Trait Implementations§

source§

impl<'a> AES128<'a> for AesECB<'a>

source§

fn enable(&self)

Enable the AES hardware. Must be called before any other methods
source§

fn disable(&self)

Disable the AES hardware
source§

fn set_client(&'a self, client: &'a dyn Client<'a>)

Set the client instance which will receive crypt_done() callbacks
source§

fn set_key(&self, key: &[u8]) -> Result<(), ErrorCode>

Set the encryption key. Returns INVAL if length is not AES128_KEY_SIZE
source§

fn set_iv(&self, iv: &[u8]) -> Result<(), ErrorCode>

Set the IV (or initial counter). Returns INVAL if length is not AES128_BLOCK_SIZE
source§

fn start_message(&self)

Begin a new message (with the configured IV) when crypt() is next called. Multiple calls to crypt() may be made between calls to start_message(), allowing the encryption context to extend over non-contiguous extents of data. Read more
source§

fn crypt( &self, source: Option<&'static mut [u8]>, dest: &'static mut [u8], start_index: usize, stop_index: usize, ) -> Option<(Result<(), ErrorCode>, Option<&'static mut [u8]>, &'static mut [u8])>

Request an encryption/decryption Read more
source§

impl AES128CBC for AesECB<'_>

source§

fn set_mode_aes128cbc(&self, encrypting: bool) -> Result<(), ErrorCode>

Call before AES128::crypt() to perform AES128CBC
source§

impl<'a> AES128CCM<'a> for AesECB<'a>

source§

fn set_client(&'a self, _client: &'a dyn CCMClient)

Set the client instance which will receive crypt_done() callbacks

source§

fn set_key(&self, _key: &[u8]) -> Result<(), ErrorCode>

Set the key to be used for CCM encryption

source§

fn set_nonce(&self, _nonce: &[u8]) -> Result<(), ErrorCode>

Set the nonce (length NONCE_LENGTH) to be used for CCM encryption

source§

fn crypt( &self, _buf: &'static mut [u8], _a_off: usize, _m_off: usize, _m_len: usize, _mic_len: usize, _confidential: bool, _encrypting: bool, ) -> Result<(), (ErrorCode, &'static mut [u8])>

Try to begin the encryption/decryption process

source§

impl AES128Ctr for AesECB<'_>

source§

fn set_mode_aes128ctr(&self, _encrypting: bool) -> Result<(), ErrorCode>

Call before AES128::crypt() to perform AES128Ctr
source§

impl AES128ECB for AesECB<'_>

source§

fn set_mode_aes128ecb(&self, encrypting: bool) -> Result<(), ErrorCode>

Call before AES128::crypt() to perform AES128ECB

Auto Trait Implementations§

§

impl<'a> !Freeze for AesECB<'a>

§

impl<'a> !RefUnwindSafe for AesECB<'a>

§

impl<'a> !Send for AesECB<'a>

§

impl<'a> !Sync for AesECB<'a>

§

impl<'a> Unpin for AesECB<'a>

§

impl<'a> !UnwindSafe for AesECB<'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.