forked from keepassxreboot/keepassxc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert back to Argon2 reference library
* Fix keepassxreboot#7487 - Botan does not use threads when calculating Argon2 KDF leading to very poor performance for a parallelism value > 1. * Include port file for vcpkg backed builds
- Loading branch information
1 parent
93624c3
commit e5a2958
Showing
7 changed files
with
107 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
cmake_minimum_required(VERSION 3.8) | ||
project(argon2 C) | ||
|
||
set(PROJECT_VERSION 20190702) | ||
|
||
if(MSVC) | ||
add_compile_options(/W3) | ||
endif() | ||
|
||
include_directories(include src) | ||
|
||
set(SRC | ||
src/argon2.c | ||
src/core.c | ||
src/encoding.c | ||
src/ref.c | ||
src/thread.c | ||
src/opt.c | ||
src/blake2/blake2b.c | ||
) | ||
|
||
set(HEADERS | ||
include/argon2.h | ||
) | ||
|
||
add_library(argon2 ${SRC}) | ||
|
||
install( | ||
TARGETS argon2 | ||
RUNTIME DESTINATION bin | ||
LIBRARY DESTINATION lib | ||
ARCHIVE DESTINATION lib | ||
) | ||
|
||
if(NOT DISABLE_INSTALL_HEADERS) | ||
install(FILES ${HEADERS} DESTINATION include) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO P-H-C/phc-winner-argon2 | ||
REF 20190702 | ||
SHA512 0a4cb89e8e63399f7df069e2862ccd05308b7652bf4ab74372842f66bcc60776399e0eaf979a7b7e31436b5e6913fe5b0a6949549d8c82ebd06e0629b106e85f | ||
HEAD_REF master | ||
) | ||
|
||
configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) | ||
|
||
vcpkg_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PREFER_NINJA | ||
OPTIONS | ||
${FEATURE_OPTIONS} | ||
OPTIONS_DEBUG | ||
-DDISABLE_INSTALL_HEADERS=ON | ||
) | ||
|
||
vcpkg_install_cmake() | ||
vcpkg_copy_pdbs() | ||
|
||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "argon2", | ||
"version-string": "20190702", | ||
"port-version": 1, | ||
"description": "Reference C implementation of Argon2, the password-hashing function that won the Password Hashing Competition (PHC).", | ||
"homepage": "https://github.com/P-H-C/phc-winner-argon2" | ||
} |