Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit 2706c70

Browse files
Merge pull request #213 from NilFoundation/directly-include-passhash
Directly include passhash
2 parents 032259e + 033b1ac commit 2706c70

40 files changed

+4161
-4
lines changed

.gitmodules

-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828
[submodule "crypto3-modes"]
2929
path = libs/modes
3030
url = ../../NilFoundation/crypto3-modes.git
31-
[submodule "crypto3-passhash"]
32-
path = libs/passhash
33-
url = ../../NilFoundation/crypto3-passhash.git
3431
[submodule "crypto3-pbkdf"]
3532
path = libs/pbkdf
3633
url = ../../NilFoundation/crypto3-pbkdf.git

libs/passhash

-1
This file was deleted.

libs/passhash/CMakeLists.txt

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
#---------------------------------------------------------------------------#
2+
# Copyright (c) 2018-2020 Mikhail Komarov <[email protected]>
3+
#
4+
# Distributed under the Boost Software License, Version 1.0
5+
# See accompanying file LICENSE_1_0.txt or copy at
6+
# http://www.boost.org/LICENSE_1_0.txt
7+
#---------------------------------------------------------------------------#
8+
9+
cmake_minimum_required(VERSION 2.8.12)
10+
11+
cmake_policy(SET CMP0028 NEW)
12+
cmake_policy(SET CMP0042 NEW)
13+
cmake_policy(SET CMP0048 NEW)
14+
cmake_policy(SET CMP0057 NEW)
15+
cmake_policy(SET CMP0076 NEW)
16+
17+
list(APPEND CMAKE_MODULE_PATH
18+
"${CMAKE_CURRENT_LIST_DIR}/cmake"
19+
"${CMAKE_CURRENT_LIST_DIR}/cmake/packages"
20+
"${CMAKE_CURRENT_LIST_DIR}/cmake/modules/share/modules/cmake")
21+
22+
include(CMDeploy)
23+
include(CMSetupVersion)
24+
include(CMConfig)
25+
26+
if(NOT CMAKE_WORKSPACE_NAME OR NOT ("${CMAKE_WORKSPACE_NAME}" STREQUAL "crypto3"))
27+
cm_workspace(crypto3)
28+
endif()
29+
30+
cm_project(passhash WORKSPACE_NAME ${CMAKE_WORKSPACE_NAME})
31+
32+
if(NOT Boost_FOUND)
33+
find_package(Boost)
34+
endif()
35+
36+
cm_find_package(${CMAKE_WORKSPACE_NAME}_codec)
37+
cm_find_package(${CMAKE_WORKSPACE_NAME}_mac)
38+
39+
list(APPEND ${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS
40+
include/nil/crypto3/passhash/bcrypt.hpp
41+
include/nil/crypto3/passhash/passhash9.hpp)
42+
43+
list(APPEND ${CURRENT_PROJECT_NAME}_UNGROUPED_SOURCES)
44+
45+
list(APPEND ${CURRENT_PROJECT_NAME}_HEADERS
46+
${${CURRENT_PROJECT_NAME}_PRIVATE_HEADERS}
47+
${${CURRENT_PROJECT_NAME}_PUBLIC_HEADERS})
48+
49+
list(APPEND ${CURRENT_PROJECT_NAME}_SOURCES
50+
${${CURRENT_PROJECT_NAME}_UNGROUPED_SOURCES})
51+
52+
cm_setup_version(VERSION 0.1.0 PREFIX ${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME})
53+
54+
add_library(${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME} INTERFACE)
55+
set_target_properties(${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME} PROPERTIES
56+
EXPORT_NAME ${CURRENT_PROJECT_NAME})
57+
58+
target_link_libraries(${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME} INTERFACE
59+
${CMAKE_WORKSPACE_NAME}::codec
60+
${CMAKE_WORKSPACE_NAME}::mac
61+
62+
${Boost_LIBRARIES})
63+
64+
target_include_directories(${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME} INTERFACE
65+
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
66+
"$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>"
67+
68+
${Boost_INCLUDE_DIRS})
69+
70+
cm_deploy(TARGETS ${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME}
71+
INCLUDE include
72+
NAMESPACE ${CMAKE_WORKSPACE_NAME}::)
73+
74+
include(CMTest)
75+
cm_add_test_subdirectory(test)
76+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
{
2+
"name": "crypto3.passhash",
3+
"version": "0.1.0",
4+
"summary": "=nil; Crypto3 C++ Cryptography Suite Cipher Passhash",
5+
"description": "Crypto3.Passhash library extends the =nil; Foundation's cryptography suite and provides a set of password hashing techniques implemented in way C++ standard library implies: concepts, algorithms, predictable behavior, latest standard features support and clean architecture without compromising security and performance.",
6+
"homepage": "http://crypto3.nil.foundation/projects/crypto3",
7+
"license": "Boost Software License",
8+
"authors": {
9+
"Mikhail Komarov": "[email protected]"
10+
},
11+
"platforms": {
12+
"ios": "5.0",
13+
"osx": "10.7"
14+
},
15+
"source": {
16+
"git": "https://github.com/nilfoundation/passhash.git",
17+
"branch": "master"
18+
},
19+
"xcconfig": {
20+
"CLANG_CXX_LANGUAGE_STANDARD": "c++14",
21+
"CLANG_CXX_LIBRARY": "libc++",
22+
"HEADER_SEARCH_PATHS": "\"${PODS_ROOT}/include/\""
23+
},
24+
"subspecs": [
25+
{
26+
"name": "include",
27+
"subspecs": [
28+
{
29+
"name": "nil",
30+
"subspecs": [
31+
{
32+
"name": "crypto3",
33+
"subspecs": [
34+
{
35+
"name": "detail",
36+
"source_files": [
37+
"include/nil/crypto3/detail/*.{hpp}"
38+
]
39+
},
40+
{
41+
"name": "passhash",
42+
"source_files": [
43+
"include/nil/crypto3/passhash/*.{hpp}"
44+
],
45+
"subspecs": [
46+
{
47+
"name": "algorithm",
48+
"source_files": [
49+
"include/nil/crypto3/passhash/algorithm/*.{hpp}"
50+
]
51+
},
52+
{
53+
"name": "accumulators",
54+
"source_files": [
55+
"include/nil/crypto3/passhash/accumulators/*.{hpp}"
56+
],
57+
"subspecs": [
58+
{
59+
"name": "parameters",
60+
"source_files": [
61+
"include/nil/crypto3/passhash/accumulators/parameters/*.{hpp}"
62+
]
63+
}
64+
]
65+
},
66+
{
67+
"name": "detail",
68+
"subspecs": [
69+
{
70+
"name": "bcrypt",
71+
"source_files": [
72+
"include/nil/crypto3/passhash/detail/bcrypt/*.{hpp}"
73+
]
74+
},
75+
{
76+
"name": "passhash9",
77+
"source_files": [
78+
"include/nil/crypto3/passhash/detail/passhash9/*.{hpp}"
79+
]
80+
}
81+
]
82+
}
83+
]
84+
}
85+
]
86+
}
87+
]
88+
}
89+
]
90+
}
91+
]
92+
}

libs/passhash/docs/concepts.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Concepts {#passhash_concepts}
2+
3+
@tableofcontents
4+
5+
## Password Hash Concept {#passhash_concept}

libs/passhash/docs/implementation.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Implementation {#passhash_impl}
2+
3+
@tableofcontents

libs/passhash/docs/index.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Password Hashing {#passhash_index}
2+
@subpage passhash_introduction
3+
@subpage passhash_manual
4+
@subpage passhash_concepts
5+
@subpage passhash_impl

libs/passhash/docs/introduction.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Introduction # {#passhash_introduction}
2+
3+
@tableofcontents
4+
5+
The Crypto3.Passhash library extends the =nil; Foundation's cryptography suite and provides a set password hashes
6+
implemented in way C++ standard library implies: concepts, algorithms, predictable behavior, latest standard features support and clean architecture without compromising security and performance.
7+
8+
Crypto3.Passhash consists of several parts to review:
9+
* [Manual](@ref passhash_manual).
10+
* [Implementation](@ref passhash_impl).
11+
* [Concepts](@ref passhash_concepts).
12+
13+
## Dependencies ## {#passhash_dependencies}
14+
15+
Internal dependencies:
16+
17+
1. [Crypto3.Mac](https://github.com/nilfoundation/block.git)
18+
2. [Crypto3.Codec](https://github.com/nilfoundation/codec.git)
19+
3. [Crypto3.Pbkdf](https://github.com/nilfoundation/pbkdf.git)
20+
21+
Outer dependencies:
22+
1. [Boost](https://boost.org) (>= 1.58)

libs/passhash/docs/manual.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Manual # {#passhash_manual}
2+
3+
@tableofcontents

0 commit comments

Comments
 (0)