/// Encode BLS12-381 G2 point to bytes
///
/// # Arguments
/// * `g2` a point
/// # Returns
/// The encoded point in compressed form
Encode BLS12-381 G2 point to bytes
Encode BLS12 - 381 G2 point to bytes
pub fn g2_to_bytes(g2: &G2) -> [u8; G2_SIZE] {
    let mut bytes = [0u8; G2_SIZE];
    bytes.copy_from_slice(g2.into_affine().into_compressed().as_ref());
    bytes
}
pub fn g2_to_bytes ( g2 : & G2 ) -> [ u8 ; G2_SIZE ] { let mut bytes = [ 0u8 ; G2_SIZE ] ; bytes . copy_from_slice ( g2 . into_affine ( ) . into_compressed ( ) . as_ref ( ) ) ; bytes }
Encode BLS12-381 G2 point to bytes
Encode BLS12 - 381 G2 point to bytes
The encoded point in compressed form
The encoded point in compressed form
g2
&G2