Struct chacha20::ChaCha20Legacy
source · [−]pub struct ChaCha20Legacy(_);
Available on crate feature
legacy
only.Expand description
The ChaCha20 stream cipher (legacy “djb” construction with 64-bit nonce).
The legacy
Cargo feature must be enabled to use this.
Trait Implementations
sourceimpl NewCipher for ChaCha20Legacy
impl NewCipher for ChaCha20Legacy
sourcefn new(key: &Key, nonce: &LegacyNonce) -> Self
fn new(key: &Key, nonce: &LegacyNonce) -> Self
Create new stream cipher instance from key and nonce arrays.
sourcefn new_from_slices(key: &[u8], nonce: &[u8]) -> Result<Self, InvalidLength>
fn new_from_slices(key: &[u8], nonce: &[u8]) -> Result<Self, InvalidLength>
Create new stream cipher instance from variable length key and nonce given as byte slices. Read more
sourceimpl StreamCipher for ChaCha20Legacy
impl StreamCipher for ChaCha20Legacy
sourceimpl StreamCipherSeek for ChaCha20Legacy
impl StreamCipherSeek for ChaCha20Legacy
sourcefn try_current_pos<T: SeekNum>(&self) -> Result<T, OverflowError>
fn try_current_pos<T: SeekNum>(&self) -> Result<T, OverflowError>
Try to get current keystream position Read more
sourcefn try_seek<T: SeekNum>(&mut self, pos: T) -> Result<(), LoopError>
fn try_seek<T: SeekNum>(&mut self, pos: T) -> Result<(), LoopError>
Try to seek to the given position Read more
sourcefn current_pos<T>(&self) -> T where
T: SeekNum,
fn current_pos<T>(&self) -> T where
T: SeekNum,
Get current keystream position Read more
Auto Trait Implementations
impl RefUnwindSafe for ChaCha20Legacy
impl Send for ChaCha20Legacy
impl Sync for ChaCha20Legacy
impl Unpin for ChaCha20Legacy
impl UnwindSafe for ChaCha20Legacy
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more