Skip to main content

pack_bytes_into_const_wires_le

Function pack_bytes_into_const_wires_le 

Source
pub fn pack_bytes_into_const_wires_le(
    b: &CircuitBuilder,
    bytes: &[u8],
) -> Vec<Wire>
Expand description

Pack bytes into constant wires using little-endian packed 64-bit words.

Creates and returns a vector of constant wires containing the packed byte data. If bytes is not a multiple of 8, the last word is zero-padded.

§Example

let bytes = b"Hello";
let wires = pack_bytes_into_const_wires_le(&builder, bytes);
// wires.len() == 1 (5 bytes packed into 1 word, zero-padded)