pub fn fr_to_bytes(fr: &Scalar) -> [u8; FR_SIZE] {
    let bytes = fr.to_bytes();
    let mut rev_bytes = [0u8; FR_SIZE];
    for i in 0..FR_SIZE {
        rev_bytes[i] = bytes[FR_SIZE - i - 1];
    }
    rev_bytes
}
/// Encode BLS12-381 field element to bytes
///
/// # Arguments
/// * `fr` a field element
/// # Returns
/// The encoded element
Encode BLS12-381 field element to bytes
Encode BLS12 - 381 field element to bytes
pub fn fr_to_bytes(fr: &Scalar) -> [u8; FR_SIZE] {
    let bytes = fr.to_bytes();
    let mut rev_bytes = [0u8; FR_SIZE];
    for i in 0..FR_SIZE {
        rev_bytes[i] = bytes[FR_SIZE - i - 1];
    }
    rev_bytes
}
pub fn fr_to_bytes ( fr : & Scalar ) -> [ u8 ; FR_SIZE ] { let bytes = fr . to_bytes ( ) ; let mut rev_bytes = [ 0u8 ; FR_SIZE ] ; for i in 0 .. FR_SIZE { rev_bytes [ i ] = bytes [ FR_SIZE - i - 1 ] ; } rev_bytes }
Encode BLS12-381 field element to bytes
Encode BLS12 - 381 field element to bytes
fr
&Scalar
The encoded element
The encoded element
fr
&Scalar