|
|
@ -13,7 +13,9 @@
|
|
|
|
#include <llarp/util/str.hpp>
|
|
|
|
#include <llarp/util/str.hpp>
|
|
|
|
#include <cassert>
|
|
|
|
#include <cassert>
|
|
|
|
#include <cstring>
|
|
|
|
#include <cstring>
|
|
|
|
|
|
|
|
#ifndef _WIN32
|
|
|
|
#include <crypt.h>
|
|
|
|
#include <crypt.h>
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#include <llarp/util/str.hpp>
|
|
|
|
#include <llarp/util/str.hpp>
|
|
|
|
|
|
|
|
|
|
|
@ -470,6 +472,11 @@ namespace llarp
|
|
|
|
bool
|
|
|
|
bool
|
|
|
|
CryptoLibSodium::check_passwd_hash(std::string pwhash, std::string challenge)
|
|
|
|
CryptoLibSodium::check_passwd_hash(std::string pwhash, std::string challenge)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
|
|
|
(void)pwhash;
|
|
|
|
|
|
|
|
(void)challenge;
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
#else
|
|
|
|
bool ret = false;
|
|
|
|
bool ret = false;
|
|
|
|
auto pos = pwhash.find_last_of('$');
|
|
|
|
auto pos = pwhash.find_last_of('$');
|
|
|
|
auto settings = pwhash.substr(0, pos);
|
|
|
|
auto settings = pwhash.substr(0, pos);
|
|
|
@ -480,6 +487,7 @@ namespace llarp
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sodium_memzero(&data, sizeof(data));
|
|
|
|
sodium_memzero(&data, sizeof(data));
|
|
|
|
return ret;
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} // namespace sodium
|
|
|
|
} // namespace sodium
|
|
|
|
|
|
|
|
|
|
|
|