fn aead_nonce(&self, position: u32, last_block: bool) -> crate::Nonce<A> {
        let mut result = GenericArray::default();

        // TODO(tarcieri): use `generic_array::sequence::Concat` (or const generics)
        let (prefix, tail) = result.split_at_mut(NonceSize::<A, Self>::to_usize());
        prefix.copy_from_slice(&self.nonce);

        let (counter, flag) = tail.split_at_mut(4);
        counter.copy_from_slice(&position.to_be_bytes());
        flag[0] = last_block as u8;

        result
    }
/// Compute the full AEAD nonce including the STREAM counter and last
/// block flag.
Compute the full AEAD nonce including the STREAM counter and last
block flag.
Compute the full AEAD nonce including the STREAM counter and last block flag .
fn aead_nonce(&self, position: u32, last_block: bool) -> crate::Nonce<A> {
        let mut result = GenericArray::default();
        // TODO(tarcieri): use `generic_array::sequence::Concat` (or const generics)
        let (prefix, tail) = result.split_at_mut(NonceSize::<A, Self>::to_usize());
        prefix.copy_from_slice(&self.nonce);
        let (counter, flag) = tail.split_at_mut(4);
        counter.copy_from_slice(&position.to_be_bytes());
        flag[0] = last_block as u8;
        result
    }
fn aead_nonce ( & self , position : u32 , last_block : bool ) -> crate :: Nonce < A > { let mut result = GenericArray :: default ( ) ; // TODO(tarcieri): use `generic_array::sequence::Concat` (or const generics) let ( prefix , tail ) = result . split_at_mut ( NonceSize :: < A , Self > :: to_usize ( ) ) ; prefix . copy_from_slice ( & self . nonce ) ; let ( counter , flag ) = tail . split_at_mut ( 4 ) ; counter . copy_from_slice ( & position . to_be_bytes ( ) ) ; flag [ 0 ] = last_block as u8 ; result }
Compute the full AEAD nonce including the STREAM counter and last
block flag.
Compute the full AEAD nonce including the STREAM counter and last block flag .
&self
position
u32
last_block
bool
&self
position
u32
last_block
bool