Make builds on windows work.
This commit is contained in:
parent
9ff0bada4e
commit
aaaadfc105
4 changed files with 27 additions and 3 deletions
|
|
@ -158,9 +158,10 @@ add_library(pglablib STATIC
|
|||
|
||||
find_package(Boost REQUIRED COMPONENTS container timer chrono assert)
|
||||
|
||||
find_path(BOTAN_INCLUDE_DIR botan/hash.h REQUIRED)
|
||||
find_library(BOTAN_LIBRARY NAMES botan-3 botan REQUIRED)
|
||||
find_package(botan CONFIG QUIET)
|
||||
if(NOT TARGET Botan::Botan)
|
||||
find_path(BOTAN_INCLUDE_DIR botan/hash.h REQUIRED)
|
||||
find_library(BOTAN_LIBRARY NAMES botan-3 botan REQUIRED)
|
||||
add_library(Botan::Botan STATIC IMPORTED)
|
||||
set_target_properties(Botan::Botan PROPERTIES
|
||||
IMPORTED_LOCATION "${BOTAN_LIBRARY}"
|
||||
|
|
|
|||
|
|
@ -267,7 +267,11 @@ KeyStrengthener PasswordManager::createKeyStrengthener()
|
|||
const std::string algo = "Scrypt";
|
||||
auto pwh_fam = Botan::PasswordHashFamily::create(algo);
|
||||
return KeyStrengthener(
|
||||
pwh_fam->tune(key_size, std::chrono::seconds(2), 130),
|
||||
#ifdef _WIN32
|
||||
pwh_fam->tune_params(key_size, 2000, 130),
|
||||
#else
|
||||
pwh_fam->tune(key_size, std::chrono::seconds(2), 130),
|
||||
#endif
|
||||
salt,
|
||||
key_size
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue