mirror of
https://github.com/wownero/wownero.git
synced 2026-11-18 06:14:15 +01:00
@@ -69,6 +69,14 @@ namespace epee
|
||||
std::string to_hex::string(const span<const std::uint8_t> src) { return convert<std::string>(src); }
|
||||
epee::wipeable_string to_hex::wipeable_string(const span<const std::uint8_t> src) { return convert<epee::wipeable_string>(src); }
|
||||
|
||||
bool to_hex::buffer(span<char> out, const span<const std::uint8_t> src) noexcept
|
||||
{
|
||||
if (out.size() % 2 != 0 || out.size() / 2 != src.size())
|
||||
return false;
|
||||
to_hex::buffer_unchecked(out.data(), src);
|
||||
return true;
|
||||
}
|
||||
|
||||
void to_hex::buffer(std::ostream& out, const span<const std::uint8_t> src)
|
||||
{
|
||||
write_hex(std::ostreambuf_iterator<char>{out}, src);
|
||||
|
||||
Reference in New Issue
Block a user