fn convert_byte_slice_to_array(slice: &[u8]) -> [u8; 32] {
    let mut out_arr = [0u8; 32];
    for (count, elt) in slice.iter().enumerate() {
        if count < 32 {
            out_arr[count] = *elt;
        } else {
            break;
        }
    }
    out_arr
}
/// Converts a slice of u8 to an array of length 8. If the
/// slice is not long enough, just pads with zeros.
Converts a slice of u8 to an array of length 8. If the
slice is not long enough, just pads with zeros.
Converts a slice of u8 to an array of length 8 . If the slice is not long enough just pads with zeros .
fn convert_byte_slice_to_array(slice: &[u8]) -> [u8; 32] {
    let mut out_arr = [0u8; 32];
    for (count, elt) in slice.iter().enumerate() {
        if count < 32 {
            out_arr[count] = *elt;
        } else {
            break;
        }
    }
    out_arr
}
fn convert_byte_slice_to_array ( slice : & [ u8 ] ) -> [ u8 ; 32 ] { let mut out_arr = [ 0u8 ; 32 ] ; for ( count , elt ) in slice . iter ( ) . enumerate ( ) { if count < 32 { out_arr [ count ] = * elt ; } else { break ; } } out_arr }
Converts a slice of u8 to an array of length 8.
Converts a slice of u8 to an array of length 8 .
slice
&[u8]
slice
&[u8]