pub fn to_byte(val: u64, n: usize) -> Vec<u8> ⓘExpand description
Convert an integer to a big-endian byte vector of length n.
The integer val is encoded in exactly n bytes, zero-padded on the left.
Used internally to serialize the checksum value before extracting its base-w digits.
Convert an integer to a big-endian byte array.
Returns a stack-allocated [u8; 8] (max needed is 4 bytes for checksum).