1#include <xrpl/basics/safe_cast.h>
2#include <xrpl/conditions/detail/error.h>
7namespace cryptoconditions {
16 name() const noexcept
override
18 return "cryptoconditions";
24 switch (safe_cast<error>(ev))
27 return "Specification: Requested type not supported.";
30 return "Specification: Requested subtype not supported.";
33 return "Specification: Requested type not recognized.";
36 return "Specification: Requested subtypes not recognized.";
39 return "Specification: Incorrect fingerprint size.";
42 return "Specification: Incorrect encoding.";
45 return "Bad buffer: contains trailing garbage.";
48 return "Bad buffer: no data.";
51 return "Bad buffer: overfull.";
54 return "Bad buffer: underfull.";
57 return "Malformed DER encoding.";
60 return "Malformed DER encoding: Unexpected tag.";
63 return "Malformed DER encoding: Short preamble.";
66 return "Implementation limit: Overlong tag.";
69 return "Implementation limit: Large payload.";
72 return "Implementation limit: Specified preimage is too long.";
76 return "generic error";
89 return &condition.category() ==
this && condition.value() == ev;
95 return &
error.category() ==
this &&
error.value() == ev;
cryptoconditions_error_category()=default
std::string message(int ev) const override
bool equivalent(std::error_code const &error, int ev) const noexcept override
std::error_condition default_error_condition(int ev) const noexcept override
char const * name() const noexcept override
bool equivalent(int ev, std::error_condition const &condition) const noexcept override
std::error_category const & get_cryptoconditions_error_category()
std::error_code make_error_code(error ev)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.