/// Parses public coefficients to a miracl-compatible form.
///
/// # Errors
/// This will return an error if any of the group elements is not a valid group
/// element.
Parses public coefficients to a miracl-compatible form.
Parses public coefficients to a miracl - compatible form .
pub fn public_coefficients_to_miracl(
    public_coefficients: &PublicCoefficientsBytes,
) -> Result<Vec<ECP2>, ()> {
    // TODO (CRP-816): Return CryptoError::MalformedPublicKey instead of ()
    public_coefficients
        .coefficients
        .iter()
        .map(|public_key| miracl_g2_from_bytes(&public_key.0).map_err(|_| ()))
        .collect()
}
pub fn public_coefficients_to_miracl ( public_coefficients : & PublicCoefficientsBytes , ) -> Result < Vec < ECP2 > , ( ) > { // TODO (CRP-816): Return CryptoError::MalformedPublicKey instead of () public_coefficients . coefficients . iter ( ) . map ( | public_key | miracl_g2_from_bytes ( & public_key . 0 ) . map_err ( | _ | ( ) ) ) . collect ( ) }
Parses public coefficients to a miracl-compatible form.
Parses public coefficients to a miracl - compatible form .
public_coefficients
&PublicCoefficientsBytes
errors
This will return an error if any of the group elements is not a valid group
element.
This will return an error if any of the group elements is not a valid group element .