#include <wipeable_string.h>
Definition at line 40 of file wipeable_string.h.
◆ value_type
◆ wipeable_string() [1/7]
| epee::wipeable_string::wipeable_string |
( |
| ) |
|
|
inline |
◆ wipeable_string() [2/7]
◆ wipeable_string() [3/7]
◆ wipeable_string() [4/7]
| epee::wipeable_string::wipeable_string |
( |
const std::string & |
other | ) |
|
Definition at line 62 of file wipeable_string.cpp.
size_t size() const noexcept
void * memcpy(void *a, const void *b, size_t c)
◆ wipeable_string() [5/7]
| epee::wipeable_string::wipeable_string |
( |
std::string && |
other | ) |
|
◆ wipeable_string() [6/7]
| epee::wipeable_string::wipeable_string |
( |
const char * |
s | ) |
|
◆ wipeable_string() [7/7]
| epee::wipeable_string::wipeable_string |
( |
const char * |
s, |
|
|
size_t |
len |
|
) |
| |
◆ ~wipeable_string()
| epee::wipeable_string::~wipeable_string |
( |
| ) |
|
◆ append()
| void epee::wipeable_string::append |
( |
const char * |
ptr, |
|
|
size_t |
len |
|
) |
| |
Definition at line 143 of file wipeable_string.cpp.
145 const size_t orgsz =
size();
const char * data() const noexcept
#define CHECK_AND_ASSERT_THROW_MES(expr, message)
◆ clear()
| void epee::wipeable_string::clear |
( |
| ) |
|
◆ data() [1/2]
| const char* epee::wipeable_string::data |
( |
| ) |
const |
|
inlinenoexcept |
◆ data() [2/2]
| char* epee::wipeable_string::data |
( |
| ) |
|
|
inlinenoexcept |
◆ empty()
| bool epee::wipeable_string::empty |
( |
| ) |
const |
|
inlinenoexcept |
◆ hex_to_pod() [1/2]
template<typename T >
| bool epee::wipeable_string::hex_to_pod |
( |
T & |
pod | ) |
const |
|
inline |
Definition at line 86 of file wipeable_string.h.
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
const GenericPointer< typename T::ValueType > T2 value
◆ hex_to_pod() [2/2]
template<typename T >
| bool epee::wipeable_string::hex_to_pod |
( |
tools::scrubbed< T > & |
pod | ) |
const |
|
inline |
Definition at line 70 of file wipeable_string.h.
bool hex_to_pod(T &pod) const
T & unwrap(mlocked< T > &src)
◆ length()
| size_t epee::wipeable_string::length |
( |
| ) |
const |
|
inlinenoexcept |
◆ operator!=()
◆ operator+=() [1/4]
| void epee::wipeable_string::operator+= |
( |
char |
c | ) |
|
◆ operator+=() [2/4]
| void epee::wipeable_string::operator+= |
( |
const char * |
s | ) |
|
◆ operator+=() [3/4]
◆ operator+=() [4/4]
| void epee::wipeable_string::operator+= |
( |
const std::string & |
s | ) |
|
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ operator==()
◆ parse_hexstr()
Definition at line 201 of file wipeable_string.cpp.
206 const size_t len =
size();
207 const char *d =
data();
208 res->grow(0, len / 2);
209 for (
size_t i = 0; i < len; i += 2)
211 char c = atolower(d[i]);
212 const char *ptr0 = strchr(hex, c);
215 c = atolower(d[i+1]);
216 const char *ptr1 = strchr(hex, c);
219 res->push_back(((ptr0-hex)<<4) | (ptr1-hex));
◆ pop_back()
| char epee::wipeable_string::pop_back |
( |
| ) |
|
◆ push_back()
| void epee::wipeable_string::push_back |
( |
char |
c | ) |
|
◆ reserve()
| void epee::wipeable_string::reserve |
( |
size_t |
sz | ) |
|
◆ resize()
| void epee::wipeable_string::resize |
( |
size_t |
sz | ) |
|
◆ size()
| size_t epee::wipeable_string::size |
( |
| ) |
const |
|
inlinenoexcept |
◆ split()
| void epee::wipeable_string::split |
( |
std::vector< wipeable_string > & |
fields | ) |
const |
Definition at line 182 of file wipeable_string.cpp.
186 const char *ptr =
data();
190 const char c = *ptr++;
194 fields.push_back({});
195 fields.back().push_back(c);
◆ trim()
| void epee::wipeable_string::trim |
( |
| ) |
|
Definition at line 167 of file wipeable_string.cpp.
170 while (prefix <
size() &&
data()[prefix] ==
' ')
173 memmove(buffer.data(), buffer.data() + prefix,
size() - prefix);
176 while (suffix <
size()-prefix &&
data()[
size() - 1 - prefix - suffix] ==
' ')
void * memmove(void *a, const void *b, size_t c)
◆ wipe()
| void epee::wipeable_string::wipe |
( |
| ) |
|
The documentation for this class was generated from the following files: