pub fn bytes_to_words(bytes: &[u8]) -> Vec<[Felt; 4]>Expand description
Convert a byte array to an equivalent vector of words
Given a byte slice laid out like so:
[b0, b1, b2, b3, b4, b5, b6, b7, .., b31]
This will produce a vector of words laid out like so:
[[{b12, ..b15}, {b8..b11}, {b4, ..b7}, {b0, ..b3}], [{b31, ..}, ..]]
In short, it produces words that when placed on the stack and written to memory word-by-word, the original bytes will be laid out in Miden’s memory in the correct order.