aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/src/http_auth.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-21 11:45:01 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-01-10 01:57:51 +0000
commit40ab12a773bc71c566485f4738dfeada7493a10a (patch)
tree9ae443fc09c7ed371cee8355d8fd06c372ce43c9 /contrib/epee/src/http_auth.cpp
parentMerge pull request #3019 (diff)
downloadmonero-40ab12a773bc71c566485f4738dfeada7493a10a.tar.xz
epee: remove dependency on common
Diffstat (limited to '')
-rw-r--r--contrib/epee/src/http_auth.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/contrib/epee/src/http_auth.cpp b/contrib/epee/src/http_auth.cpp
index f06f05528..5b8d892ff 100644
--- a/contrib/epee/src/http_auth.cpp
+++ b/contrib/epee/src/http_auth.cpp
@@ -66,7 +66,6 @@
#include <tuple>
#include <type_traits>
-#include "crypto/crypto.h"
#include "hex.h"
#include "md5_l.h"
#include "string_coding.h"
@@ -711,8 +710,8 @@ namespace epee
{
namespace http
{
- http_server_auth::http_server_auth(login credentials)
- : user(session{std::move(credentials)}) {
+ http_server_auth::http_server_auth(login credentials, std::function<void(size_t, uint8_t*)> r)
+ : user(session{std::move(credentials)}), rng(std::move(r)) {
}
boost::optional<http_response_info> http_server_auth::do_get_response(const http_request_info& request)
@@ -746,7 +745,7 @@ namespace epee
user->counter = 0;
{
std::array<std::uint8_t, 16> rand_128bit{{}};
- crypto::rand(rand_128bit.size(), rand_128bit.data());
+ rng(rand_128bit.size(), rand_128bit.data());
user->nonce = string_encoding::base64_encode(rand_128bit.data(), rand_128bit.size());
}
return create_digest_response(user->nonce, is_stale);