pub struct Salsa20 { /* private fields */ }
Expand description
The Salsa20 stream cipher
Implementations§
Source§impl Salsa20
impl Salsa20
Sourcepub fn new(key: Key, nonce: [u8; 8], counter: u64) -> Salsa20
pub fn new(key: Key, nonce: [u8; 8], counter: u64) -> Salsa20
creates Salsa20 stream cipher
§Arguments
key
- secret key, 32-byte or 16-byte sequencenounce
- 8-byte unique sequencecounter
- 8-byte unique number of each 64-byte block
Sourcepub fn set_counter(&mut self, counter: u64)
pub fn set_counter(&mut self, counter: u64)
sets unique number of next 64-byte block
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Salsa20
impl RefUnwindSafe for Salsa20
impl Send for Salsa20
impl Sync for Salsa20
impl Unpin for Salsa20
impl UnwindSafe for Salsa20
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