embassy-crypto

Crates

git

Versions

default

Flavors

Skip to main content

Aes128Ecb

Trait Aes128Ecb 

Source
pub trait Aes128Ecb {
    type Context: Send + Sync + Clone;

    // Required methods
    fn init(key: &[u8; 16]) -> Self::Context;
    fn encrypt_blocks(ctx: &Self::Context, blocks: InOutBuf<'_, '_, u8>);
    fn decrypt_blocks(ctx: &Self::Context, blocks: InOutBuf<'_, '_, u8>);
}
Expand description

AES-128 block cipher (ECB) driver.

Required Associated Types§

Source

type Context: Send + Sync + Clone

Opaque storage for the implementation’s key schedule.

Required Methods§

Source

fn init(key: &[u8; 16]) -> Self::Context

Initialize with a 128-bit key.

Source

fn encrypt_blocks(ctx: &Self::Context, blocks: InOutBuf<'_, '_, u8>)

Encrypt blocks, a whole number of 16-byte blocks.

Source

fn decrypt_blocks(ctx: &Self::Context, blocks: InOutBuf<'_, '_, u8>)

Decrypt blocks, a whole number of 16-byte blocks.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§