package octez-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=aa2f5bc99cc4ca2217c52a1af2a2cdfd3b383208cb859ca2e79ca0903396ca1d
sha512=d68bb3eb615e3dcccc845fddfc9901c95b3c6dc8e105e39522ce97637b1308a7fa7aa1d271351d5933febd7476b2819e1694f31198f1f0919681f1f9cc97cb3a
doc/octez-libs.plompiler/Plompiler/LibCircuit/Bytes/index.html
Module LibCircuit.Bytes
Source
Representation of bytes.
Little-endian representation of bytes. First element of the list is the Least Significant Bit.
input_bytes ~le bs
returns the representation of bs
that Plompiler expects as input.
constant ~le bs
returns a value holding the bytes bs
. le
can be used to set the endianness.
constant_uint32 ~le n
returns a value holding the bytes correspoding to the uint n
. le
can be used to set the endianness.
concat bs
returns the concatenation of the bitlists in bs
.
add b1 b2
computes the addition of b1
and b2
.
xor b1 b2
computes the bitwise xor between b1
and b2
.
band b1 b2
computes the bitwise conjunction between b1
and b2
.
rotate_left bl n
shifts the bits left by n positions, so that each bit is more significant. The most significant bit becomes the least significant i.e. it is "rotated". rotate_left bl (length bl) = bl
rotate_right bl n
shifts the bits right by n positions. Similar to rotate_left
, but to the right.
shift_left bl n
shifts all bits left by n positions, so that each bit is more significant. The most signigicant bit is lost and the least significant bit is set to zero. More precisely, if we interpret the bl
as an integer shift_left bl i = bl * 2^i mod 2^{length a}
shift_right bl n
shifts all bits right by n positions. Similar to shift_left
, but to the right.