/// Converts an element of `Fq` into a byte representation in
/// little-endian byte order.
Converts an element of `Fq` into a byte representation in
little-endian byte order.
Converts an element of ` Fq ` into a byte representation in little - endian byte order .
pub fn to_bytes(&self) -> [u8; 32] {
        // Turn into canonical form by computing
        // (a.R) / R = a
        #[cfg(all(feature = "asm", target_arch = "x86_64"))]
        let tmp = Fq::montgomery_reduce(&[self.0[0], self.0[1], self.0[2], self.0[3], 0, 0, 0, 0]);
        #[cfg(any(not(feature = "asm"), not(target_arch = "x86_64")))]
        let tmp = Fq::montgomery_reduce(self.0[0], self.0[1], self.0[2], self.0[3], 0, 0, 0, 0);
        let mut res = [0; 32];
        res[0..8].copy_from_slice(&tmp.0[0].to_le_bytes());
        res[8..16].copy_from_slice(&tmp.0[1].to_le_bytes());
        res[16..24].copy_from_slice(&tmp.0[2].to_le_bytes());
        res[24..32].copy_from_slice(&tmp.0[3].to_le_bytes());
        res
    }
pub fn to_bytes ( & self ) -> [ u8 ; 32 ] { // Turn into canonical form by computing // (a.R) / R = a # [ cfg ( all ( feature " " target_arch " " ) ) ] let tmp = Fq :: montgomery_reduce ( & [ self . 0 [ 0 ] , self . 0 [ 1 ] , self . 0 [ 2 ] , self . 0 [ 3 ] , 0 , 0 , 0 , 0 ] ) ; # [ cfg ( any ( not ( feature " " ) not ( target_arch " " ) ) ) ] let tmp = Fq :: montgomery_reduce ( self . 0 [ 0 ] , self . 0 [ 1 ] , self . 0 [ 2 ] , self . 0 [ 3 ] , 0 , 0 , 0 , 0 ) ; let mut res = [ 0 ; 32 ] ; res [ 0 .. 8 ] . copy_from_slice ( & tmp . 0 [ 0 ] . to_le_bytes ( ) ) ; res [ 8 .. 16 ] . copy_from_slice ( & tmp . 0 [ 1 ] . to_le_bytes ( ) ) ; res [ 16 .. 24 ] . copy_from_slice ( & tmp . 0 [ 2 ] . to_le_bytes ( ) ) ; res [ 24 .. 32 ] . copy_from_slice ( & tmp . 0 [ 3 ] . to_le_bytes ( ) ) ; res }
Converts an element of `Fq` into a byte representation in
little-endian byte order.
Converts an element of ` Fq ` into a byte representation in little - endian byte order .
&self
<not_specific>