pub struct Cipher<StreamAlg, BlockAlg>where
StreamAlg: KeySizeUser,{ /* private fields */ }
Expand description
The Adiantum cipher. Implements KeyInit
where key size is equal to key size of the underlying stream cipher.
Implementations§
Source§impl<StreamAlg, BlockAlg> Cipher<StreamAlg, BlockAlg>where
StreamAlg: KeyIvInit + StreamCipher,
StreamAlg::IvSize: IsGreaterOrEqual<U16>,
BlockAlg: BlockEncrypt + BlockSizeUser<BlockSize = U16>,
impl<StreamAlg, BlockAlg> Cipher<StreamAlg, BlockAlg>where
StreamAlg: KeyIvInit + StreamCipher,
StreamAlg::IvSize: IsGreaterOrEqual<U16>,
BlockAlg: BlockEncrypt + BlockSizeUser<BlockSize = U16>,
Source§impl<StreamAlg, BlockAlg> Cipher<StreamAlg, BlockAlg>where
StreamAlg: KeyIvInit + StreamCipher,
StreamAlg::IvSize: IsGreaterOrEqual<U16>,
BlockAlg: BlockDecrypt + BlockSizeUser<BlockSize = U16>,
impl<StreamAlg, BlockAlg> Cipher<StreamAlg, BlockAlg>where
StreamAlg: KeyIvInit + StreamCipher,
StreamAlg::IvSize: IsGreaterOrEqual<U16>,
BlockAlg: BlockDecrypt + BlockSizeUser<BlockSize = U16>,
Trait Implementations§
Source§impl<StreamAlg, BlockAlg> Drop for Cipher<StreamAlg, BlockAlg>where
StreamAlg: KeySizeUser,
impl<StreamAlg, BlockAlg> Drop for Cipher<StreamAlg, BlockAlg>where
StreamAlg: KeySizeUser,
Source§impl<StreamAlg, BlockAlg> KeyInit for Cipher<StreamAlg, BlockAlg>
impl<StreamAlg, BlockAlg> KeyInit for Cipher<StreamAlg, BlockAlg>
Source§fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>
fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>
Create new value from variable size key.
Source§impl<StreamAlg, BlockAlg> KeySizeUser for Cipher<StreamAlg, BlockAlg>where
StreamAlg: KeySizeUser,
impl<StreamAlg, BlockAlg> KeySizeUser for Cipher<StreamAlg, BlockAlg>where
StreamAlg: KeySizeUser,
Auto Trait Implementations§
impl<StreamAlg, BlockAlg> Freeze for Cipher<StreamAlg, BlockAlg>where
BlockAlg: Freeze,
<<StreamAlg as KeySizeUser>::KeySize as ArrayLength<u8>>::ArrayType: Freeze,
impl<StreamAlg, BlockAlg> RefUnwindSafe for Cipher<StreamAlg, BlockAlg>where
BlockAlg: RefUnwindSafe,
<<StreamAlg as KeySizeUser>::KeySize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
StreamAlg: RefUnwindSafe,
impl<StreamAlg, BlockAlg> Send for Cipher<StreamAlg, BlockAlg>
impl<StreamAlg, BlockAlg> Sync for Cipher<StreamAlg, BlockAlg>
impl<StreamAlg, BlockAlg> Unpin for Cipher<StreamAlg, BlockAlg>where
BlockAlg: Unpin,
<<StreamAlg as KeySizeUser>::KeySize as ArrayLength<u8>>::ArrayType: Unpin,
StreamAlg: Unpin,
impl<StreamAlg, BlockAlg> UnwindSafe for Cipher<StreamAlg, BlockAlg>where
BlockAlg: UnwindSafe,
<<StreamAlg as KeySizeUser>::KeySize as ArrayLength<u8>>::ArrayType: UnwindSafe,
StreamAlg: UnwindSafe,
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