mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #4306
56b50faa
wallet: use wipeable_string in more places where a secret is used (moneromooo-monero)07ec748c
wipeable_string: add hex_to_pod function (moneromooo-monero)
This commit is contained in:
commit
580497d5f9
6 changed files with 70 additions and 40 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