diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-09-18 17:32:11 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-09-18 17:32:11 +0200 |
commit | 580497d5f93df0c6f1358e087e8c97079fd7dfa0 (patch) | |
tree | 911c5ad29c5a8dce201a74f774f8956fff176cc6 /tests | |
parent | Merge pull request #4302 (diff) | |
parent | wallet: use wipeable_string in more places where a secret is used (diff) | |
download | monero-580497d5f93df0c6f1358e087e8c97079fd7dfa0.tar.xz |
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)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit_tests/wipeable_string.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/unit_tests/wipeable_string.cpp b/tests/unit_tests/wipeable_string.cpp index 5ea1c1729..65718fd45 100644 --- a/tests/unit_tests/wipeable_string.cpp +++ b/tests/unit_tests/wipeable_string.cpp @@ -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")); +} |