8#include "../bool/bool.hpp"
9#include "../circuit_builders/circuit_builders_fwd.hpp"
10#include "../field/field.hpp"
43 const size_t num_bytes = 32,
88 value.set_origin_tag(tag);
107 value.set_free_witness_tag();
117 value.unset_free_witness_tag();
124 std::ios_base::fmtflags f(os.flags());
127 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. Asserts that the write does ...
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
field_t< Builder > & operator[](const size_t index)
field_t< Builder > operator[](const size_t index) const
std::string get_string() const
Given a byte_array, compute a vector containing the values of its entries and convert it to a string.
Builder * get_context() const
bb::OriginTag get_origin_tag() const
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