Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

utils

Fully qualified path: alexandria_bytes::utils

Free functions

keccak_u128s_beComputes the keccak256 of multiple uint128 values. The values are interpreted as big-endian. https://github.com/starkware-libs/cairo/blob/main/corelib/src/keccak.cairo…
u256_reverse_endianReverses the endianness of a u256 value….
u8_array_to_u256Convert sha256 result(Array ) to u256…
u32s_to_u256Converts an array of 8 u32 values to a u256 value….
u128_array_sliceReturns the slice of an array….
u128_splitSplit a u128 into two parts, 0, left_size-1 and left_size, end…
read_sub_u128Read sub value from u128 just like substr in other language…
u128_joinJoin two u128 into one…

Impls

BytesDebugImplementation of Debug trait for Bytes. Formats the Bytes as a hexadecimal string prefixed with “0x”.
BytesDisplayImplementation of Display trait for Bytes. Formats the Bytes as a hexadecimal string prefixed with “0x”.