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