pub fn bytes_to_packed_u32_elements(bytes: &[u8]) -> Vec<BaseElement>Expand description
Converts bytes to field elements using u32 packing in little-endian format.
Each field element contains a u32 value representing up to 4 bytes. If the byte length is not a multiple of 4, the final field element is zero-padded.
§Arguments
bytes: The byte slice to convert
§Returns
A vector of field elements, each containing 4 bytes packed in little-endian order.
§Examples
let bytes = vec![0x01, 0x02, 0x03, 0x04, 0x05];
let felts = bytes_to_packed_u32_elements(&bytes);
assert_eq!(felts, vec![Felt::new(0x04030201), Felt::new(0x00000005)]);