/// Converts a vec into the correct number of bytes for a G2
Converts a vec into the correct number of bytes for a G2
Converts a vec into the correct number of bytes for a G2
pub fn g2_bytes_from_vec(bytes: &[u8]) -> [u8; G2::SIZE] {
    if bytes.len() != G2::SIZE {
        panic!("Wrong size for G2");
    }
    let mut ans = [0u8; G2::SIZE];
    ans.copy_from_slice(bytes);
    ans
}
pub fn g2_bytes_from_vec ( bytes : & [ u8 ] ) -> [ u8 ; G2 :: SIZE ] { if bytes . len ( ) != G2 :: SIZE { panic ! ( " " ) ; } let mut ans = [ 0u8 ; G2 :: SIZE ] ; ans . copy_from_slice ( bytes ) ; ans }
Converts a vec into the correct number of bytes for a G2
Converts a vec into the correct number of bytes for a G2
bytes
&[u8]