From 8035e3233cda3d3fe8c9ebac985e7b1d90e2680c Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 19 Mar 2020 08:11:58 +0100 Subject: [PATCH] move some of the headers that should be included in the library to "include/eoskeygen" folder. --- CMakeLists.txt | 2 ++ {src => include/eoskeygen}/core/dictionary.h | 0 {src => include/eoskeygen}/core/string.h | 0 {src => include/eoskeygen}/crypto/WIF.h | 2 +- {src => include/eoskeygen}/crypto/base58.h | 0 {src => include/eoskeygen}/crypto/checksum.h | 2 +- {src => include/eoskeygen}/crypto/ec.h | 2 +- {src => include/eoskeygen}/crypto/hash.h | 2 +- {src => include/eoskeygen}/crypto/types.h | 0 {src => include/eoskeygen}/key_search.h | 4 ++-- src/benchmark.cpp | 2 +- src/core/dictionary.cpp | 4 ++-- src/core/file.h | 2 +- src/core/string.cpp | 4 ++-- src/crypto/WIF.cpp | 6 +++--- src/crypto/base58.cpp | 2 +- src/crypto/openssl/ec.cpp | 2 +- src/crypto/openssl/hash.cpp | 2 +- src/key_search.cpp | 4 ++-- src/key_search_helpers.cpp | 4 ++-- src/key_search_helpers.h | 4 ++-- src/key_search_mt.cpp | 4 ++-- src/main.cpp | 14 +++++++------- 23 files changed, 35 insertions(+), 33 deletions(-) rename {src => include/eoskeygen}/core/dictionary.h (100%) rename {src => include/eoskeygen}/core/string.h (100%) rename {src => include/eoskeygen}/crypto/WIF.h (97%) rename {src => include/eoskeygen}/crypto/base58.h (100%) rename {src => include/eoskeygen}/crypto/checksum.h (98%) rename {src => include/eoskeygen}/crypto/ec.h (97%) rename {src => include/eoskeygen}/crypto/hash.h (97%) rename {src => include/eoskeygen}/crypto/types.h (100%) rename {src => include/eoskeygen}/key_search.h (96%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5192dfb..bfdeb95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,6 +88,8 @@ include_directories(${PROJECT_BINARY_DIR}) # Include OpenSSL headers include_directories( ${OPENSSL_INCLUDE_DIR} ) +include_directories( include ) + add_executable( ${PROGRAM_EXE} ${PROGRAM_SOURCE} ) target_link_libraries( ${PROGRAM_EXE} diff --git a/src/core/dictionary.h b/include/eoskeygen/core/dictionary.h similarity index 100% rename from src/core/dictionary.h rename to include/eoskeygen/core/dictionary.h diff --git a/src/core/string.h b/include/eoskeygen/core/string.h similarity index 100% rename from src/core/string.h rename to include/eoskeygen/core/string.h diff --git a/src/crypto/WIF.h b/include/eoskeygen/crypto/WIF.h similarity index 97% rename from src/crypto/WIF.h rename to include/eoskeygen/crypto/WIF.h index 14a1855..5572ce3 100644 --- a/src/crypto/WIF.h +++ b/include/eoskeygen/crypto/WIF.h @@ -25,7 +25,7 @@ #define EOSIOKEYGEN_CRYPTO_WIF_H #include -#include "types.h" +#include namespace eoskeygen { diff --git a/src/crypto/base58.h b/include/eoskeygen/crypto/base58.h similarity index 100% rename from src/crypto/base58.h rename to include/eoskeygen/crypto/base58.h diff --git a/src/crypto/checksum.h b/include/eoskeygen/crypto/checksum.h similarity index 98% rename from src/crypto/checksum.h rename to include/eoskeygen/crypto/checksum.h index a5f48f8..85ad8c4 100644 --- a/src/crypto/checksum.h +++ b/include/eoskeygen/crypto/checksum.h @@ -27,7 +27,7 @@ #include #include #include -#include "hash.h" +#include namespace eoskeygen { diff --git a/src/crypto/ec.h b/include/eoskeygen/crypto/ec.h similarity index 97% rename from src/crypto/ec.h rename to include/eoskeygen/crypto/ec.h index e8558dd..7fa9af4 100644 --- a/src/crypto/ec.h +++ b/include/eoskeygen/crypto/ec.h @@ -24,7 +24,7 @@ #ifndef EOSIOKEYGEN_CRYPTO_EC_H #define EOSIOKEYGEN_CRYPTO_EC_H -#include "types.h" +#include namespace eoskeygen { diff --git a/src/crypto/hash.h b/include/eoskeygen/crypto/hash.h similarity index 97% rename from src/crypto/hash.h rename to include/eoskeygen/crypto/hash.h index 783ba57..7219e22 100644 --- a/src/crypto/hash.h +++ b/include/eoskeygen/crypto/hash.h @@ -25,7 +25,7 @@ #define EOSIOKEYGEN_CRYPTO_HASH_H #include -#include "types.h" +#include namespace eoskeygen { diff --git a/src/crypto/types.h b/include/eoskeygen/crypto/types.h similarity index 100% rename from src/crypto/types.h rename to include/eoskeygen/crypto/types.h diff --git a/src/key_search.h b/include/eoskeygen/key_search.h similarity index 96% rename from src/key_search.h rename to include/eoskeygen/key_search.h index 39cee28..78c7f6d 100644 --- a/src/key_search.h +++ b/include/eoskeygen/key_search.h @@ -24,8 +24,8 @@ #ifndef EOSIOKEYGEN_KEY_SEARCH_H #define EOSIOKEYGEN_KEY_SEARCH_H -#include "core/dictionary.h" -#include "core/string.h" +#include +#include namespace eoskeygen { diff --git a/src/benchmark.cpp b/src/benchmark.cpp index bc8e69f..43d8b35 100644 --- a/src/benchmark.cpp +++ b/src/benchmark.cpp @@ -22,7 +22,7 @@ * SOFTWARE. */ #include -#include "crypto/ec.h" +#include #include "benchmark.h" using std::chrono::steady_clock; diff --git a/src/core/dictionary.cpp b/src/core/dictionary.cpp index ffa8b89..6aebcb9 100644 --- a/src/core/dictionary.cpp +++ b/src/core/dictionary.cpp @@ -3,9 +3,9 @@ #include #include #include +#include +#include #include "file.h" -#include "string.h" -#include "dictionary.h" namespace eoskeygen { diff --git a/src/core/file.h b/src/core/file.h index 72cb5ab..2167a6b 100644 --- a/src/core/file.h +++ b/src/core/file.h @@ -24,7 +24,7 @@ #ifndef EOSIOKEYGEN_CORE_FILE_H #define EOSIOKEYGEN_CORE_FILE_H -#include "string.h" +#include #include namespace eoskeygen { diff --git a/src/core/string.cpp b/src/core/string.cpp index f9f0da6..aeb2a7d 100644 --- a/src/core/string.cpp +++ b/src/core/string.cpp @@ -24,8 +24,8 @@ #include #include #include -#include "../crypto/base58.h" -#include "string.h" +#include +#include namespace eoskeygen { diff --git a/src/crypto/WIF.cpp b/src/crypto/WIF.cpp index d31aff4..a86a207 100644 --- a/src/crypto/WIF.cpp +++ b/src/crypto/WIF.cpp @@ -23,9 +23,9 @@ */ #include #include -#include "base58.h" -#include "checksum.h" -#include "WIF.h" +#include +#include +#include namespace eoskeygen { diff --git a/src/crypto/base58.cpp b/src/crypto/base58.cpp index a1d112f..47581f5 100644 --- a/src/crypto/base58.cpp +++ b/src/crypto/base58.cpp @@ -27,7 +27,7 @@ #include #include #include -#include "base58.h" +#include namespace eoskeygen { diff --git a/src/crypto/openssl/ec.cpp b/src/crypto/openssl/ec.cpp index 4b43a70..9fc5431 100644 --- a/src/crypto/openssl/ec.cpp +++ b/src/crypto/openssl/ec.cpp @@ -24,7 +24,7 @@ #include #include #include -#include "../ec.h" +#include namespace eoskeygen { diff --git a/src/crypto/openssl/hash.cpp b/src/crypto/openssl/hash.cpp index 424c46a..f79abc2 100644 --- a/src/crypto/openssl/hash.cpp +++ b/src/crypto/openssl/hash.cpp @@ -23,7 +23,7 @@ */ #include #include -#include "../hash.h" +#include namespace eoskeygen { diff --git a/src/key_search.cpp b/src/key_search.cpp index 7c99a94..a40dbce 100644 --- a/src/key_search.cpp +++ b/src/key_search.cpp @@ -22,9 +22,9 @@ * SOFTWARE. */ #include -#include "crypto/ec.h" +#include +#include #include "key_search_helpers.h" -#include "key_search.h" namespace eoskeygen { diff --git a/src/key_search_helpers.cpp b/src/key_search_helpers.cpp index 661b6e0..0ea5608 100644 --- a/src/key_search_helpers.cpp +++ b/src/key_search_helpers.cpp @@ -22,8 +22,8 @@ * SOFTWARE. */ #include -#include "core/dictionary.h" -#include "crypto/WIF.h" +#include +#include #include "console.h" #include "key_search_helpers.h" diff --git a/src/key_search_helpers.h b/src/key_search_helpers.h index 9b2862c..2340897 100644 --- a/src/key_search_helpers.h +++ b/src/key_search_helpers.h @@ -24,8 +24,8 @@ #ifndef EOSIOKEYGEN_KEY_SEARCH_HELPERS_H #define EOSIOKEYGEN_KEY_SEARCH_HELPERS_H -#include "core/string.h" -#include "crypto/types.h" +#include +#include namespace eoskeygen { diff --git a/src/key_search_mt.cpp b/src/key_search_mt.cpp index 35fcbfe..56c2907 100644 --- a/src/key_search_mt.cpp +++ b/src/key_search_mt.cpp @@ -25,9 +25,9 @@ #include #include #include -#include "crypto/ec.h" +#include +#include #include "key_search_helpers.h" -#include "key_search.h" namespace eoskeygen { diff --git a/src/main.cpp b/src/main.cpp index 7fb38ee..bca286c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,16 +26,16 @@ #endif /* HAVE_THREADS */ #include #include -#include "config.h" +#include +#include +#include +#include +#include +#include #include "core/file.h" -#include "core/dictionary.h" -#include "core/string.h" -#include "crypto/base58.h" -#include "crypto/ec.h" -#include "crypto/WIF.h" #include "console.h" -#include "key_search.h" #include "benchmark.h" +#include "config.h" // Command line options. bool option_l33t = false;