pub trait AesBlockCipher<K: ?Sized>: CryptoProvider {
// Required methods
fn encrypt_block(
&self,
key: &K,
block: &[u8; 16],
) -> Result<[u8; 16], Self::Error>;
fn decrypt_block(
&self,
key: &K,
block: &[u8; 16],
) -> Result<[u8; 16], Self::Error>;
}Expand description
AES single-block encryption and decryption.
The key type is intentionally generic so providers can operate on clear key material, opaque key handles, or other key representations.
Required Methods§
fn encrypt_block( &self, key: &K, block: &[u8; 16], ) -> Result<[u8; 16], Self::Error>
fn decrypt_block( &self, key: &K, block: &[u8; 16], ) -> Result<[u8; 16], Self::Error>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".