pub fn start<R: RngCore + CryptoRng>(
        rng: &mut R,
        password: &[u8],
    ) -> Result<ClientLoginStartResult<CS>, ProtocolError> {
        let blind_result = blind::<CS, _>(rng, password)?;
        let (ke1_state, ke1_message) = CS::KeyExchange::generate_ke1(rng)?;

        let credential_request = CredentialRequest {
            blinded_element: blind_result.message,
            ke1_message,
        };
        let serialized_credential_request = credential_request.serialize()?;

        Ok(ClientLoginStartResult {
            message: credential_request,
            state: Self {
                oprf_client: blind_result.state,
                ke1_state,
                serialized_credential_request,
            },
        })
    }
/// Returns an initial "blinded" password request to send to the server, as well as a ClientLogin
Returns an initial "blinded" password request to send to the server, as well as a ClientLogin
Returns an initial " blinded " password request to send to the server as well as a ClientLogin
pub fn start<R: RngCore + CryptoRng>(
        rng: &mut R,
        password: &[u8],
    ) -> Result<ClientLoginStartResult<CS>, ProtocolError> {
        let blind_result = blind::<CS, _>(rng, password)?;
        let (ke1_state, ke1_message) = CS::KeyExchange::generate_ke1(rng)?;
        let credential_request = CredentialRequest {
            blinded_element: blind_result.message,
            ke1_message,
        };
        let serialized_credential_request = credential_request.serialize()?;
        Ok(ClientLoginStartResult {
            message: credential_request,
            state: Self {
                oprf_client: blind_result.state,
                ke1_state,
                serialized_credential_request,
            },
        })
    }
pub fn start < R : RngCore + CryptoRng > ( rng : & mut R , password : & [ u8 ] , ) -> Result < ClientLoginStartResult < CS > , ProtocolError > { let blind_result = blind :: < CS , _ > ( rng , password ) ? ; let ( ke1_state , ke1_message ) = CS :: KeyExchange :: generate_ke1 ( rng ) ? ; let credential_request = CredentialRequest { blinded_element : blind_result . message , ke1_message , } ; let serialized_credential_request = credential_request . serialize ( ) ? ; Ok ( ClientLoginStartResult { message : credential_request , state : Self { oprf_client : blind_result . state , ke1_state , serialized_credential_request , } , } ) }
Returns an initial "blinded" password request to send to the server, as well as a ClientLogin
Returns an initial " blinded " password request to send to the server as well as a ClientLogin
rng
&mut R
password
&[u8]
rng
&mut R
password
&[u8]