// 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 big_from_big_endian_chunks(data: &Vec<miracl::BIG>) -> miracl::BIG {
        // Note: Relies on miracl::BIG::new() being zero.
        let curve_order = miracl::BIG::new_ints(&miracl::rom::CURVE_ORDER);
        data.iter().fold(miracl::BIG::new(), |mut acc, term| {
            acc.shl(16);
            let mut reduced_term = miracl::BIG::new_big(term);
            reduced_term.rmod(&curve_order);
            acc.add(&reduced_term);
            acc.rmod(&curve_order); // Needed to avoid getting a buffer overflow.
            acc
        })
    }
pub fn big_from_big_endian_chunks ( data : & Vec < miracl :: BIG > ) -> miracl :: BIG { // Note: Relies on miracl::BIG::new() being zero. let curve_order = miracl :: BIG :: new_ints ( & miracl :: rom :: CURVE_ORDER ) ; data . iter ( ) . fold ( miracl :: BIG :: new ( ) , | mut acc , term | { acc . shl ( 16 ) ; let mut reduced_term = miracl :: BIG :: new_big ( term ) ; reduced_term . rmod ( & curve_order ) ; acc . add ( & reduced_term ) ; acc . rmod ( & curve_order ) ; // Needed to avoid getting a buffer overflow. acc } ) }
Vec is the only type we need this for.
Vec is the only type we need this for .
data
&Vec<miracl::BIG>