31 #include <boost/optional/optional.hpp> 59 void append(
const char *ptr,
size_t len);
61 const char *
data() const noexcept {
return buffer.data(); }
62 char *
data() noexcept {
return buffer.data(); }
63 size_t size() const noexcept {
return buffer.size(); }
64 size_t length() const noexcept {
return buffer.size(); }
65 bool empty() const noexcept {
return buffer.empty(); }
67 void split(std::vector<wipeable_string> &fields)
const;
69 template<
typename T>
inline bool hex_to_pod(
T &pod)
const;
80 void grow(
size_t sz,
size_t reserved = 0);
83 std::vector<char> buffer;
89 if (
size() !=
sizeof(
T) * 2)
91 boost::optional<epee::wipeable_string> blob =
parse_hexstr();
94 if (blob->size() !=
sizeof(
T))
96 pod = *(
const T*)blob->data();
boost::optional< wipeable_string > parse_hexstr() const
size_t size() const noexcept
bool hex_to_pod(tools::scrubbed< T > &pod) const
void append(const char *ptr, size_t len)
bool hex_to_pod(T &pod) const
bool operator!=(const wipeable_string &other) const noexcept
size_t length() const noexcept
void split(std::vector< wipeable_string > &fields) const
bool empty() const noexcept
uint64_t FNV1a(const char *ptr, size_t sz)
wipeable_string & operator=(wipeable_string &&other)
const GenericPointer< typename T::ValueType > T2 value
T & unwrap(mlocked< T > &src)
size_t operator()(const epee::wipeable_string &s) const
bool operator==(const wipeable_string &other) const noexcept
const char * data() const noexcept