pub fn batch_evaluate_prepare<'a, I: Iterator<Item = &'a BlindedElement<CS>>>(
        &self,
        blinded_elements: I,
        info: Option<&[u8]>,
    ) -> Result<PoprfServerBatchEvaluatePrepareResult<CS, I>>
    where
        CS: 'a,
    {
        let tweak = compute_tweak::<CS>(self.sk, info)?;

        Ok(PoprfServerBatchEvaluatePrepareResult {
            prepared_evaluation_elements: blinded_elements.zip(iter::repeat(tweak)).map(
                |(blinded_element, tweak)| {
                    PreparedEvaluationElement(EvaluationElement(
                        blinded_element.0 * &CS::Group::invert_scalar(tweak),
                    ))
                },
            ),
            prepared_tweak: PoprfPreparedTweak(tweak),
        })
    }
/// Alternative version of `batch_evaluate` without
/// memory allocation. Returned [`PreparedEvaluationElement`] have to
/// be [`collect`](Iterator::collect)ed and passed into
/// [`batch_evaluate_finish`](Self::batch_evaluate_finish).
///
/// # Errors
/// - [`Error::Info`] if the `info` is longer than `u16::MAX`.
/// - [`Error::Protocol`] if the protocol fails and can't be completed.
Alternative version of `batch_evaluate` without
memory allocation.
Alternative version of ` batch_evaluate ` without memory allocation .
pub fn batch_evaluate_prepare<'a, I: Iterator<Item = &'a BlindedElement<CS>>>(
        &self,
        blinded_elements: I,
        info: Option<&[u8]>,
    ) -> Result<PoprfServerBatchEvaluatePrepareResult<CS, I>>
    where
        CS: 'a,
    {
        let tweak = compute_tweak::<CS>(self.sk, info)?;
        Ok(PoprfServerBatchEvaluatePrepareResult {
            prepared_evaluation_elements: blinded_elements.zip(iter::repeat(tweak)).map(
                |(blinded_element, tweak)| {
                    PreparedEvaluationElement(EvaluationElement(
                        blinded_element.0 * &CS::Group::invert_scalar(tweak),
                    ))
                },
            ),
            prepared_tweak: PoprfPreparedTweak(tweak),
        })
    }
pub fn batch_evaluate_prepare < ' a , I : Iterator < Item = & ' a BlindedElement < CS > > > ( & self , blinded_elements : I , info : Option < & [ u8 ] > , ) -> Result < PoprfServerBatchEvaluatePrepareResult < CS , I > > where CS : ' a , { let tweak = compute_tweak :: < CS > ( self . sk , info ) ? ; Ok ( PoprfServerBatchEvaluatePrepareResult { prepared_evaluation_elements : blinded_elements . zip ( iter :: repeat ( tweak ) ) . map ( | ( blinded_element , tweak ) | { PreparedEvaluationElement ( EvaluationElement ( blinded_element . 0 * & CS :: Group :: invert_scalar ( tweak ) , ) ) } , ) , prepared_tweak : PoprfPreparedTweak ( tweak ) , } ) }
Alternative version of `batch_evaluate` without
memory allocation.
Alternative version of ` batch_evaluate ` without memory allocation .
&self
blinded_elements
I
info
Option<&[u8]>
&self
blinded_elements
I
info
Option<&[u8]>
errors
[`Error::Info`] if the `info` is longer than `u16::MAX`.
[`Error::Protocol`] if the protocol fails and can't be completed.
[ ` Error :: Info ` ] if the ` info ` is longer than ` u16 :: MAX ` . [ ` Error :: Protocol ` ] if the protocol fails and can ' t be completed .