From 3dffe71b72c3b5dd1246ed74ee4cd1ad89aaccfa Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 25 Nov 2017 14:50:15 +0000 Subject: new wipeable_string class to replace std::string passphrases --- contrib/epee/src/http_auth.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'contrib/epee/src/http_auth.cpp') diff --git a/contrib/epee/src/http_auth.cpp b/contrib/epee/src/http_auth.cpp index 30e562700..f06f05528 100644 --- a/contrib/epee/src/http_auth.cpp +++ b/contrib/epee/src/http_auth.cpp @@ -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(arg.data()), + arg.size() + ); + } md5::MD5_CTX& ctx; }; -- cgit v1.2.3