embassy-stm32

Crates

git

Versions

stm32h7s3a8

Flavors

๐Ÿ“ฃ We want to hear from you! Fill the Rust Embedded 2024 micro-survey.

Struct embassy_stm32::cryp::TdesEcb

source ยท
pub struct TdesEcb<'c, const KEY_SIZE: usize> { /* private fields */ }
Expand description

TDES-ECB Cipher Mode

Implementationsยง

sourceยง

impl<'c, const KEY_SIZE: usize> TdesEcb<'c, KEY_SIZE>

source

pub fn new(key: &'c [u8; KEY_SIZE]) -> Self

Constructs a new AES-ECB cipher for a cryptographic operation.

Trait Implementationsยง

sourceยง

impl<'c, const KEY_SIZE: usize> Cipher<'c> for TdesEcb<'c, KEY_SIZE>

sourceยง

const BLOCK_SIZE: usize = 8usize

Processing block size. Determined by the processor and the algorithm.
sourceยง

const REQUIRES_PADDING: bool = true

Indicates whether the cipher requires the application to provide padding. If true, no partial blocks will be accepted (a panic will occur).
sourceยง

fn key(&self) -> &'c [u8]

Returns the symmetric key.
sourceยง

fn iv(&self) -> &'c [u8]

Returns the initialization vector.
sourceยง

fn set_algomode(&self, p: Cryp)

Sets the processor algorithm mode according to the associated cipher.
sourceยง

fn prepare_key(&self, _p: Cryp)

Performs any key preparation within the processor, if necessary.
sourceยง

fn init_phase_blocking<T: Instance, DmaIn, DmaOut>( &self, _p: Cryp, _cryp: &Cryp<'_, T, DmaIn, DmaOut>, )

Performs any cipher-specific initialization.
sourceยง

async fn init_phase<T: Instance, DmaIn, DmaOut>( &self, _p: Cryp, _cryp: &mut Cryp<'_, T, DmaIn, DmaOut>, )
where DmaIn: DmaIn<T>, DmaOut: DmaOut<T>,

Performs any cipher-specific initialization.
sourceยง

fn pre_final(&self, _p: Cryp, _dir: Direction, _padding_len: usize) -> [u32; 4]

Called prior to processing the last data block for cipher-specific operations.
sourceยง

fn post_final_blocking<T: Instance, DmaIn, DmaOut>( &self, _p: Cryp, _cryp: &Cryp<'_, T, DmaIn, DmaOut>, _dir: Direction, _int_data: &mut [u8; 16], _temp1: [u32; 4], _padding_mask: [u8; 16], )

Called after processing the last data block for cipher-specific operations.
sourceยง

async fn post_final<T: Instance, DmaIn, DmaOut>( &self, _p: Cryp, _cryp: &mut Cryp<'_, T, DmaIn, DmaOut>, _dir: Direction, _int_data: &mut [u8; 16], _temp1: [u32; 4], _padding_mask: [u8; 16], )
where DmaIn: DmaIn<T>, DmaOut: DmaOut<T>,

Called after processing the last data block for cipher-specific operations.
sourceยง

fn get_header_block(&self) -> &[u8]

Returns the AAD header block as required by the cipher.
sourceยง

impl<'c> CipherSized for TdesEcb<'c, { _ }>

sourceยง

impl<'c> CipherSized for TdesEcb<'c, { _ }>

sourceยง

impl<'c, const KEY_SIZE: usize> IVSized for TdesEcb<'c, KEY_SIZE>

Auto Trait Implementationsยง

ยง

impl<'c, const KEY_SIZE: usize> Freeze for TdesEcb<'c, KEY_SIZE>

ยง

impl<'c, const KEY_SIZE: usize> RefUnwindSafe for TdesEcb<'c, KEY_SIZE>

ยง

impl<'c, const KEY_SIZE: usize> Send for TdesEcb<'c, KEY_SIZE>

ยง

impl<'c, const KEY_SIZE: usize> Sync for TdesEcb<'c, KEY_SIZE>

ยง

impl<'c, const KEY_SIZE: usize> Unpin for TdesEcb<'c, KEY_SIZE>

ยง

impl<'c, const KEY_SIZE: usize> UnwindSafe for TdesEcb<'c, KEY_SIZE>

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>,

sourceยง

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>,

sourceยง

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.