pub struct Aes128Cbc(/* private fields */);Expand description
AES-CBC-128 Cipher implementation.
Trait Implementations§
Source§impl BlockCipher for Aes128Cbc
impl BlockCipher for Aes128Cbc
Source§type Key = [u8; 16]
type Key = [u8; 16]
The byte array key type which specifies the size of the key used to instantiate the cipher.
Source§type Nonce = [u8; 16]
type Nonce = [u8; 16]
The byte array nonce type which specifies the size of the nonce used in the cipher
operations.
Source§fn new_encrypt(key: &Self::Key, nonce: &Self::Nonce) -> Self
fn new_encrypt(key: &Self::Key, nonce: &Self::Nonce) -> Self
Instantiate a new instance of a block cipher for encryption from a
key and iv.Source§fn new_decrypt(key: &Self::Key, nonce: &Self::Nonce) -> Self
fn new_decrypt(key: &Self::Key, nonce: &Self::Nonce) -> Self
Instantiate a new instance of a block cipher for decryption from a
key and iv.Source§fn encrypt_padded(self, buffer: &[u8]) -> Result<Vec<u8>, CipherError>
fn encrypt_padded(self, buffer: &[u8]) -> Result<Vec<u8>, CipherError>
Encrypts the given data in
buffer, and returns the result (with padding) in a newly
allocated vector, or a CipherError if the operation was unsuccessful.Source§fn decrypt_padded(self, buffer: &[u8]) -> Result<Vec<u8>, CipherError>
fn decrypt_padded(self, buffer: &[u8]) -> Result<Vec<u8>, CipherError>
Decrypts the given data in a
buffer, and returns the result (with padding removed) in a
newly allocated vector, or a CipherError if the operation was unsuccessful.Auto Trait Implementations§
impl Freeze for Aes128Cbc
impl RefUnwindSafe for Aes128Cbc
impl !Send for Aes128Cbc
impl !Sync for Aes128Cbc
impl Unpin for Aes128Cbc
impl UnsafeUnpin for Aes128Cbc
impl UnwindSafe for Aes128Cbc
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