mirror of
https://github.com/monero-project/monero.git
synced 2025-08-01 14:46:09 -04:00
wallet: wipe seed from memory where appropriate
This commit is contained in:
parent
b780cf4db1
commit
ea37614efe
19 changed files with 653 additions and 144 deletions
|
@ -33,6 +33,7 @@
|
|||
#include <iosfwd>
|
||||
#include <string>
|
||||
|
||||
#include "wipeable_string.h"
|
||||
#include "span.h"
|
||||
|
||||
namespace epee
|
||||
|
@ -41,6 +42,8 @@ namespace epee
|
|||
{
|
||||
//! \return A std::string containing hex of `src`.
|
||||
static std::string string(const span<const std::uint8_t> src);
|
||||
//! \return A epee::wipeable_string containing hex of `src`.
|
||||
static epee::wipeable_string wipeable_string(const span<const std::uint8_t> src);
|
||||
|
||||
//! \return An array containing hex of `src`.
|
||||
template<std::size_t N>
|
||||
|
@ -59,6 +62,8 @@ namespace epee
|
|||
static void formatted(std::ostream& out, const span<const std::uint8_t> src);
|
||||
|
||||
private:
|
||||
template<typename T> T static convert(const span<const std::uint8_t> src);
|
||||
|
||||
//! Write `src` bytes as hex to `out`. `out` must be twice the length
|
||||
static void buffer_unchecked(char* out, const span<const std::uint8_t> src) noexcept;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue