aztec-nr - noir_aztec::utils::conversion::fields_as_bytes

Function decode_fields_from_bytes

pub fn decode_fields_from_bytes<let N: u32>(
    bytes: BoundedVec<u8, N>,
) -> BoundedVec<Field, N / 32>

Decodes bytes back into fields.

Panics if the input length is not a multiple of 32 or if any chunk exceeds the BN254 field modulus. See try_decode_fields_from_bytes for a non-panicking variant.