ByteArrayExtImpl
ByteArray extension trait.
Fully qualified path: openzeppelin_utils::bytearray::ByteArrayExtImpl
pub impl ByteArrayExtImpl of ByteArrayExtTrait;
Impl functions
read_n_bytes
Requirements:
start + nmust be less than or equal to the length of the byte array.
Fully qualified path: openzeppelin_utils::bytearray::ByteArrayExtImpl::read_n_bytes
fn read_n_bytes(self: @ByteArray, start: u32, n: u32) -> ByteArray
to_byte_array
Converts a value to a byte array with a given base and padding.
Requirements:
basecannot be zero.
Fully qualified path: openzeppelin_utils::bytearray::ByteArrayExtImpl::to_byte_array
fn to_byte_array(self: @T, base: u8, padding: u16) -> ByteArray
hash
Hashes a byte array using the Pedersen hash algorithm. Encodes the byte array as a ´Span´ by serializing ´data´.
Fully qualified path: openzeppelin_utils::bytearray::ByteArrayExtImpl::hash
fn hash(self: @ByteArray) -> felt252