fn squeeze_internal(&mut self, rate_start_index: usize, output: &mut[F])
    {
        // if we can finish in this call
        if rate_start_index + output.len() <= self.rate 
        {
            for i in 0..output.len()
            {
                output[i] = self.state[i + rate_start_index];
            }
            self.mode = SpongeState::Squeezing{ next_squeeze_index: rate_start_index + output.len() };
            return;
        }
        // otherwise squeeze (rate - rate_start_index) elements
        let num_elements_squeezed = self.rate - rate_start_index;
        for i in 0..num_elements_squeezed
        {
            output[i] = self.state[i + rate_start_index];
        }

        // Unless we are done with squeezing in this call, permute.
        if (output.len() != self.rate)
        {
            self.permute();
        }
        // Tail recurse, with the correct change to indices in output happening due to changing the slice
        self.squeeze_internal(0, &mut output[num_elements_squeezed..]);
    }
// Squeeze |output| many elements. This does not end in a squeeze
Squeeze |output| many elements. This does not end in a squeeze
Squeeze |output| many elements . This does not end in a squeeze
fn squeeze_internal(&mut self, rate_start_index: usize, output: &mut[F])
    {
        // if we can finish in this call
        if rate_start_index + output.len() <= self.rate 
        {
            for i in 0..output.len()
            {
                output[i] = self.state[i + rate_start_index];
            }
            self.mode = SpongeState::Squeezing{ next_squeeze_index: rate_start_index + output.len() };
            return;
        }
        // otherwise squeeze (rate - rate_start_index) elements
        let num_elements_squeezed = self.rate - rate_start_index;
        for i in 0..num_elements_squeezed
        {
            output[i] = self.state[i + rate_start_index];
        }
        // Unless we are done with squeezing in this call, permute.
        if (output.len() != self.rate)
        {
            self.permute();
        }
        // Tail recurse, with the correct change to indices in output happening due to changing the slice
        self.squeeze_internal(0, &mut output[num_elements_squeezed..]);
    }
fn squeeze_internal ( & mut self , rate_start_index : usize , output : & mut [ F ] ) { // if we can finish in this call if rate_start_index + output . len ( ) <= self . rate { for i in 0 .. output . len ( ) { output [ i ] = self . state [ i + rate_start_index ] ; } self . mode = SpongeState :: Squeezing { next_squeeze_index : rate_start_index + output . len ( ) } ; return ; } // otherwise squeeze (rate - rate_start_index) elements let num_elements_squeezed = self . rate - rate_start_index ; for i in 0 .. num_elements_squeezed { output [ i ] = self . state [ i + rate_start_index ] ; } // Unless we are done with squeezing in this call, permute. if ( output . len ( ) != self . rate ) { self . permute ( ) ; } // Tail recurse, with the correct change to indices in output happening due to changing the slice self . squeeze_internal ( 0 , & mut output [ num_elements_squeezed .. ] ) ; }
Squeeze |output| many elements.
Squeeze |output| many elements .
&mut self
rate_start_index
usize
output
&mut[F]