/// Decode BLS12-381 G1 point from bytes
///
/// # Arguments
/// * `bytes`: a compressed instance of G1 point
/// # Errors
/// * `GroupDecodingError` if the input is invalid
/// # Returns
/// The decoded point
Decode BLS12-381 G1 point from bytes
Decode BLS12 - 381 G1 point from bytes
pub fn g1_from_bytes(bytes: &[u8; G1_SIZE]) -> Result<G1, GroupDecodingError> {
    let mut compressed: <G1Affine as CurveAffine>::Compressed = EncodedPoint::empty();
    compressed.as_mut().copy_from_slice(bytes);
    compressed
        .into_affine()
        .map(|affine| affine.into_projective())
}
pub fn g1_from_bytes ( bytes : & [ u8 ; G1_SIZE ] ) -> Result < G1 , GroupDecodingError > { let mut compressed : < G1Affine as CurveAffine > :: Compressed = EncodedPoint :: empty ( ) ; compressed . as_mut ( ) . copy_from_slice ( bytes ) ; compressed . into_affine ( ) . map ( | affine | affine . into_projective ( ) ) }
Decode BLS12-381 G1 point from bytes
Decode BLS12 - 381 G1 point from bytes
The decoded point
The decoded point
bytes
&[u8; G1_SIZE]
errors
`GroupDecodingError` if the input is invalid
` GroupDecodingError ` if the input is invalid