8#include "../bool/bool.hpp"
9#include "../circuit_builders/circuit_builders_fwd.hpp"
10#include "../field/field.hpp"
50 const size_t num_bytes = 32,
114 value.set_free_witness_tag();
124 value.unset_free_witness_tag();
131 std::ios_base::fmtflags f(os.flags());
134 os <<
' ' <<
std::setw(2) << +(
unsigned char)
byte;
#define BB_ASSERT_LT(left, right,...)
Represents a dynamic array of bytes in-circuit.
byte_array slice(size_t offset) const
Slice bytes from the byte array starting at offset. Does not add any constraints.
byte_array reverse() const
Reverse the bytes in the byte array.
byte_array & write_at(byte_array const &other, size_t index)
Overwrites this byte_array starting at index with the contents of other.
void set_origin_tag(bb::OriginTag tag)
byte_array & write(byte_array const &other)
Appends the contents of another byte_array (other) to the end of this one.
void unset_free_witness_tag()
Unset the free witness flag for the byte array.
byte_array & operator=(const byte_array &other)
std::vector< uint8_t > get_value() const
A helper converting a byte_array into the vector of its uint8_t values.
bytes_t const & bytes() const
static byte_array from_constants(Builder *parent_context, std::vector< uint8_t > const &input)
Create a byte_array from constant values without adding range constraints.
field_t< Builder > operator[](const size_t index) const
Builder * get_context() const
bb::OriginTag get_origin_tag() const
static byte_array constant_padding(Builder *parent_context, size_t num_bytes, uint8_t value=0)
void set_free_witness_tag()
Set the free witness flag for the byte array.
typename std::vector< field_t< Builder > > bytes_t
uint8_t const size_t length
std::ostream & operator<<(std::ostream &os, uint256_t const &a)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept