// Vec is the only type we need this for.  Being specific reduces repeated code.
Vec is the only type we need this for.  Being specific reduces repeated code.
Vec is the only type we need this for . Being specific reduces repeated code .
pub fn ecp_from_big_endian_chunks(data: &Vec<miracl::ECP>) -> miracl::ECP {
        // Note: Relies on miracl::ECP::new() being zero == point at infinity.
        data.iter().fold(miracl::ECP::new(), |acc, term| {
            let mut acc = acc.mul(&miracl::BIG::new_int(1 << 16));
            let mut reduced_term = miracl::ECP::new();
            reduced_term.copy(term);
            reduced_term.affine();
            acc.add(&reduced_term);
            acc.affine(); // Needed to avoid getting an overflow error.
            acc
        })
    }
pub fn ecp_from_big_endian_chunks ( data : & Vec < miracl :: ECP > ) -> miracl :: ECP { // Note: Relies on miracl::ECP::new() being zero == point at infinity. data . iter ( ) . fold ( miracl :: ECP :: new ( ) , | acc , term | { let mut acc = acc . mul ( & miracl :: BIG :: new_int ( 1 << 16 ) ) ; let mut reduced_term = miracl :: ECP :: new ( ) ; reduced_term . copy ( term ) ; reduced_term . affine ( ) ; acc . add ( & reduced_term ) ; acc . affine ( ) ; // Needed to avoid getting an overflow error. acc } ) }
Vec is the only type we need this for.
Vec is the only type we need this for .
data
&Vec<miracl::ECP>