new wipeable_string class to replace std::string passphrases

This commit is contained in:
moneromooo-monero
2017-11-25 14:50:15 +00:00
parent 7a2a574118
commit 3dffe71b72
15 changed files with 293 additions and 68 deletions

View File

@@ -125,6 +125,14 @@ namespace
{
(*this)(boost::string_ref(arg));
}
void operator()(const epee::wipeable_string& arg) const
{
md5::MD5Update(
std::addressof(ctx),
reinterpret_cast<const std::uint8_t*>(arg.data()),
arg.size()
);
}
md5::MD5_CTX& ctx;
};