pub(crate) fn apply_keystream(&mut self, counter: u64, output: &mut [u8]) {
        debug_assert_eq!(output.len(), BLOCK_SIZE);
        self.counter_setup(counter);

        let mut state = self.state;
        self.rounds(&mut state);

        for (i, chunk) in output.chunks_mut(4).enumerate() {
            for (a, b) in chunk.iter_mut().zip(&state[i].to_le_bytes()) {
                *a ^= *b;
            }
        }
    }
/// Apply generated keystream to the output buffer
Apply generated keystream to the output buffer
Apply generated keystream to the output buffer
pub(crate) fn apply_keystream(&mut self, counter: u64, output: &mut [u8]) {
        debug_assert_eq!(output.len(), BLOCK_SIZE);
        self.counter_setup(counter);
        let mut state = self.state;
        self.rounds(&mut state);
        for (i, chunk) in output.chunks_mut(4).enumerate() {
            for (a, b) in chunk.iter_mut().zip(&state[i].to_le_bytes()) {
                *a ^= *b;
            }
        }
    }
pub ( crate ) fn apply_keystream ( & mut self , counter : u64 , output : & mut [ u8 ] ) { debug_assert_eq ! ( output len ( ) BLOCK_SIZE ) ; self . counter_setup ( counter ) ; let mut state = self . state ; self . rounds ( & mut state ) ; for ( i , chunk ) in output . chunks_mut ( 4 ) . enumerate ( ) { for ( a , b ) in chunk . iter_mut ( ) . zip ( & state [ i ] . to_le_bytes ( ) ) { * a ^= * b ; } } }
Apply generated keystream to the output buffer
Apply generated keystream to the output buffer
&mut self
counter
u64
output
&mut [u8]