Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

one_shift_left_bytes_u128

Computes 256^n_bytes for u128 byte shifting operations

This function provides a lookup table for powers of 256 up to 256^15, which covers the full range of byte positions within a u128 value. Each position represents shifting by one byte (8 bits) to the left.

Arguments

  • n_bytes - The number of byte positions to shift (0-15)

Returns

  • u128 - The value 256^n_bytes, panics if n_bytes > 15

Fully qualified path: alexandria_bytes::bit_array::one_shift_left_bytes_u128

pub fn one_shift_left_bytes_u128(n_bytes: u32) -> u128