Struct chacha20::Cipher [−][src]
ChaCha family stream cipher, generic around a number of rounds.
Use the ChaCha8
, ChaCha12
, or ChaCha20
type aliases to select
a specific number of rounds.
Generally ChaCha20
is preferred.
Trait Implementations
impl<R: Rounds> Debug for Cipher<R>
[src]
impl<R: Rounds> NewStreamCipher for Cipher<R>
[src]
type KeySize = U32
Key size in bytes
type NonceSize = U12
Nonce size in bytes
fn new(key: &Key, nonce: &Nonce) -> Self
[src]
pub fn new_var(key: &[u8], nonce: &[u8]) -> Result<Self, InvalidKeyNonceLength>
[src]
impl<R: Rounds> SyncStreamCipher for Cipher<R>
[src]
fn try_apply_keystream(&mut self, data: &mut [u8]) -> Result<(), LoopError>
[src]
pub fn apply_keystream(&mut self, data: &mut [u8])
[src]
impl<R: Rounds> SyncStreamCipherSeek for Cipher<R>
[src]
Auto Trait Implementations
impl<R> Send for Cipher<R> where
R: Send,
R: Send,
impl<R> Sync for Cipher<R> where
R: Sync,
R: Sync,
impl<R> Unpin for Cipher<R> where
R: Unpin,
R: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<C> StreamCipher for C where
C: SyncStreamCipher,
[src]
C: SyncStreamCipher,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,