1#include <xrpld/conditions/Condition.h>
2#include <xrpld/conditions/detail/PreimageSha256.h>
3#include <xrpld/conditions/detail/utils.h>
6namespace cryptoconditions {
53 auto p = parsePreamble(s, ec);
58 if (!isPrimitive(p) || !isContextSpecific(p))
81 p = parsePreamble(s, ec);
86 if (!isPrimitive(p) || !isContextSpecific(p))
98 auto cost = parseInteger<std::uint32_t>(s, p.
length, ec);
149 auto const p = parsePreamble(s, ec);
155 if (!isConstructed(p) || !isContextSpecific(p))
161 if (p.length > s.
size())
Like std::vector<char> but better.
An immutable linear range of bytes.
bool empty() const noexcept
Return true if the byte range is empty.
std::uint8_t const * data() const noexcept
Return a pointer to beginning of the storage.
std::size_t size() const noexcept
Returns the number of bytes in the storage.
std::size_t length() const noexcept
static std::unique_ptr< Condition > deserialize(Slice s, std::error_code &ec)
Load a condition from its binary form.
static constexpr std::size_t maxSerializedCondition
The largest binary condition we support.
static constexpr std::size_t maxPreimageLength
The maximum allowed length of a preimage.
constexpr std::size_t fingerprintSize
std::unique_ptr< Condition > loadSimpleSha256(Type type, Slice s, std::error_code &ec)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.