llarp::AlignedBuffer
aligned buffer that is sz bytes long and aligns to the nearest Alignment More...
#include <aligned.hpp>
Public Types
| Name | |
|---|---|
| using std::array< byte_t, SIZE > | Data |
Public Functions
| Name | |
|---|---|
| virtual | ~AlignedBuffer() =default |
| AlignedBuffer() | |
| AlignedBuffer(const byte_t * data) | |
| AlignedBuffer(const Data & buf) | |
| AlignedBuffer & | operator=(const byte_t * data) |
| AlignedBuffer< sz > | operator~() const bitwise NOT |
| bool | operator==(const AlignedBuffer & other) const |
| bool | operator!=(const AlignedBuffer & other) const |
| bool | operator<(const AlignedBuffer & other) const |
| bool | operator>(const AlignedBuffer & other) const |
| bool | operator<=(const AlignedBuffer & other) const |
| bool | operator>=(const AlignedBuffer & other) const |
| AlignedBuffer | operator^(const AlignedBuffer & other) const |
| AlignedBuffer & | operator^=(const AlignedBuffer & other) |
| byte_t & | operator[](size_t idx) |
| const byte_t & | operator[](size_t idx) const |
| void | Fill(byte_t f) |
| Data & | as_array() |
| const Data & | as_array() const |
| byte_t * | data() |
| const byte_t * | data() const |
| bool | IsZero() const |
| void | Zero() |
| virtual void | Randomize() |
| Data::iterator | begin() |
| Data::iterator | end() |
| Data::const_iterator | begin() const |
| Data::const_iterator | end() const |
| bool | FromBytestring(llarp_buffer_t * buf) |
| bool | BEncode(llarp_buffer_t * buf) const |
| bool | BDecode(llarp_buffer_t * buf) |
| std::string_view | ToView() const |
| std::string | ToHex() const |
| std::string | ShortHex() const |
| bool | FromHex(std::string_view str) |
| constexpr size_t | size() |
Public Attributes
| Name | |
|---|---|
| constexpr size_t | SIZE |
Detailed Description
template <size_t sz>
struct llarp::AlignedBuffer;
aligned buffer that is sz bytes long and aligns to the nearest Alignment
Public Types Documentation
using Data
using llarp::AlignedBuffer< sz >::Data = std::array<byte_t, SIZE>;
Public Functions Documentation
function ~AlignedBuffer
virtual ~AlignedBuffer() =default
function AlignedBuffer
inline AlignedBuffer()
function AlignedBuffer
inline explicit AlignedBuffer(
const byte_t * data
)
function AlignedBuffer
inline explicit AlignedBuffer(
const Data & buf
)
function operator=
inline AlignedBuffer & operator=(
const byte_t * data
)
function operator~
inline AlignedBuffer< sz > operator~() const
bitwise NOT
function operator==
inline bool operator==(
const AlignedBuffer & other
) const
function operator!=
inline bool operator!=(
const AlignedBuffer & other
) const
function operator<
inline bool operator<(
const AlignedBuffer & other
) const
function operator>
inline bool operator>(
const AlignedBuffer & other
) const
function operator<=
inline bool operator<=(
const AlignedBuffer & other
) const
function operator>=
inline bool operator>=(
const AlignedBuffer & other
) const
function operator^
inline AlignedBuffer operator^(
const AlignedBuffer & other
) const
function operator^=
inline AlignedBuffer & operator^=(
const AlignedBuffer & other
)
function operator[]
inline byte_t & operator[](
size_t idx
)
function operator[]
inline const byte_t & operator[](
size_t idx
) const
function Fill
inline void Fill(
byte_t f
)
function as_array
inline Data & as_array()
function as_array
inline const Data & as_array() const
function data
inline byte_t * data()
function data
inline const byte_t * data() const
function IsZero
inline bool IsZero() const
function Zero
inline void Zero()
function Randomize
inline virtual void Randomize()
Reimplemented by: llarp::service::ConvoTag::Randomize
function begin
inline Data::iterator begin()
function end
inline Data::iterator end()
function begin
inline Data::const_iterator begin() const
function end
inline Data::const_iterator end() const
function FromBytestring
inline bool FromBytestring(
llarp_buffer_t * buf
)
function BEncode
inline bool BEncode(
llarp_buffer_t * buf
) const
function BDecode
inline bool BDecode(
llarp_buffer_t * buf
)
function ToView
inline std::string_view ToView() const
function ToHex
inline std::string ToHex() const
function ShortHex
inline std::string ShortHex() const
function FromHex
inline bool FromHex(
std::string_view str
)
function size
static inline constexpr size_t size()
Public Attributes Documentation
variable SIZE
static constexpr size_t SIZE = sz;
Updated on 2026-01-10 at 22:49:45 +0000