mirror of
https://github.com/monero-project/monero.git
synced 2025-06-22 01:04:14 -04:00
wipeable_string: add hex_to_pod function
This commit is contained in:
parent
91c7d68b2d
commit
07ec748c82
4 changed files with 28 additions and 2 deletions
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include "misc_log_ex.h"
|
||||
#include "wipeable_string.h"
|
||||
#include "hex.h"
|
||||
|
||||
TEST(wipeable_string, ctor)
|
||||
{
|
||||
|
@ -202,3 +203,9 @@ TEST(wipeable_string, parse_hexstr)
|
|||
ASSERT_TRUE((s = epee::wipeable_string("414243").parse_hexstr()));
|
||||
ASSERT_EQ(*s, epee::wipeable_string("ABC"));
|
||||
}
|
||||
|
||||
TEST(wipeable_string, to_hex)
|
||||
{
|
||||
ASSERT_TRUE(epee::to_hex::wipeable_string(epee::span<const uint8_t>((const uint8_t*)"", 0)) == epee::wipeable_string(""));
|
||||
ASSERT_TRUE(epee::to_hex::wipeable_string(epee::span<const uint8_t>((const uint8_t*)"abc", 3)) == epee::wipeable_string("616263"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue