pub fn evaluate<R: RngCore + CryptoRng>(
        &self,
        rng: &mut R,
        blinded_element: &BlindedElement<CS>,
        info: Option<&[u8]>,
    ) -> Result<PoprfServerEvaluateResult<CS>> {
        let PoprfServerBatchEvaluatePrepareResult {
            mut prepared_evaluation_elements,
            prepared_tweak,
        } = self.batch_evaluate_prepare(iter::once(blinded_element), info)?;

        let prepared_evaluation_element = prepared_evaluation_elements.next().unwrap();
        let prepared_evaluation_elements = core::array::from_ref(&prepared_evaluation_element);

        let PoprfServerBatchEvaluateFinishResult {
            mut messages,
            proof,
        } = Self::batch_evaluate_finish(
            rng,
            iter::once(blinded_element),
            prepared_evaluation_elements,
            &prepared_tweak,
        )
        .unwrap();

        Ok(PoprfServerEvaluateResult {
            message: messages.next().unwrap(),
            proof,
        })
    }
/// Computes the second step for the multiplicative blinding version of
/// DH-OPRF. This message is sent from the server (who holds the OPRF key)
/// to the client.
///
/// # Errors
/// - [`Error::Info`] if the `info` is longer than `u16::MAX`.
/// - [`Error::Protocol`] if the protocol fails and can't be completed.
Computes the second step for the multiplicative blinding version of
DH-OPRF. This message is sent from the server (who holds the OPRF key)
to the client.
Computes the second step for the multiplicative blinding version of DH - OPRF . This message is sent from the server ( who holds the OPRF key ) to the client .
pub fn evaluate<R: RngCore + CryptoRng>(
        &self,
        rng: &mut R,
        blinded_element: &BlindedElement<CS>,
        info: Option<&[u8]>,
    ) -> Result<PoprfServerEvaluateResult<CS>> {
        let PoprfServerBatchEvaluatePrepareResult {
            mut prepared_evaluation_elements,
            prepared_tweak,
        } = self.batch_evaluate_prepare(iter::once(blinded_element), info)?;
        let prepared_evaluation_element = prepared_evaluation_elements.next().unwrap();
        let prepared_evaluation_elements = core::array::from_ref(&prepared_evaluation_element);
        let PoprfServerBatchEvaluateFinishResult {
            mut messages,
            proof,
        } = Self::batch_evaluate_finish(
            rng,
            iter::once(blinded_element),
            prepared_evaluation_elements,
            &prepared_tweak,
        )
        .unwrap();
        Ok(PoprfServerEvaluateResult {
            message: messages.next().unwrap(),
            proof,
        })
    }
pub fn evaluate < R : RngCore + CryptoRng > ( & self , rng : & mut R , blinded_element : & BlindedElement < CS > , info : Option < & [ u8 ] > , ) -> Result < PoprfServerEvaluateResult < CS > > { let PoprfServerBatchEvaluatePrepareResult { mut prepared_evaluation_elements , prepared_tweak , } = self . batch_evaluate_prepare ( iter :: once ( blinded_element ) , info ) ? ; let prepared_evaluation_element = prepared_evaluation_elements . next ( ) . unwrap ( ) ; let prepared_evaluation_elements = core :: array :: from_ref ( & prepared_evaluation_element ) ; let PoprfServerBatchEvaluateFinishResult { mut messages , proof , } = Self :: batch_evaluate_finish ( rng , iter :: once ( blinded_element ) , prepared_evaluation_elements , & prepared_tweak , ) . unwrap ( ) ; Ok ( PoprfServerEvaluateResult { message : messages . next ( ) . unwrap ( ) , proof , } ) }
Computes the second step for the multiplicative blinding version of
DH-OPRF.
Computes the second step for the multiplicative blinding version of DH - OPRF .
&self
rng
&mut R
blinded_element
&BlindedElement<CS>
info
Option<&[u8]>
&self
rng
&mut R
blinded_element
&BlindedElement<CS>
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 .