diff --git a/CMakeLists.txt b/CMakeLists.txt index 4906a70..fa88c06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,6 @@ set (PROGRAM_EXE ${CMAKE_PROJECT_NAME}) set (PROGRAM_SOURCE src/string.cpp - src/ec/openssl.cpp src/base58.cpp src/checksum.cpp src/WIF.cpp @@ -46,6 +45,7 @@ endif() # Libraries find_package(OpenSSL 1.1 REQUIRED) +set (PROGRAM_SOURCE ${PROGRAM_SOURCE} src/crypto/openssl/ec.cpp) if (USE_THREADS) find_package(Threads) diff --git a/src/WIF.h b/src/WIF.h index 9ee077c..a8bba10 100644 --- a/src/WIF.h +++ b/src/WIF.h @@ -25,7 +25,7 @@ #define EOSIOKEYGEN_WIF_H #include -#include "ec/types.h" +#include "crypto/types.h" namespace eoskeygen { diff --git a/src/benchmark.cpp b/src/benchmark.cpp index 42b6b20..bc8e69f 100644 --- a/src/benchmark.cpp +++ b/src/benchmark.cpp @@ -22,7 +22,7 @@ * SOFTWARE. */ #include -#include "ec/generate.h" +#include "crypto/ec.h" #include "benchmark.h" using std::chrono::steady_clock; diff --git a/src/ec/generate.h b/src/crypto/ec.h similarity index 92% rename from src/ec/generate.h rename to src/crypto/ec.h index e617fa3..e8558dd 100644 --- a/src/ec/generate.h +++ b/src/crypto/ec.h @@ -21,8 +21,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef EOSIOKEYGEN_EC_GENERATE_H -#define EOSIOKEYGEN_EC_GENERATE_H +#ifndef EOSIOKEYGEN_CRYPTO_EC_H +#define EOSIOKEYGEN_CRYPTO_EC_H #include "types.h" @@ -36,4 +36,4 @@ int ec_generate_key(struct ec_keypair *pair); } // namespace eoskeygen -#endif /* EOSIOKEYGEN_EC_GENERATE_H */ +#endif /* EOSIOKEYGEN_CRYPTO_EC_H */ diff --git a/src/ec/openssl.cpp b/src/crypto/openssl/ec.cpp similarity index 98% rename from src/ec/openssl.cpp rename to src/crypto/openssl/ec.cpp index 563af41..da83738 100644 --- a/src/ec/openssl.cpp +++ b/src/crypto/openssl/ec.cpp @@ -24,7 +24,7 @@ #include #include #include -#include "generate.h" +#include "../ec.h" namespace eoskeygen { diff --git a/src/ec/types.h b/src/crypto/types.h similarity index 93% rename from src/ec/types.h rename to src/crypto/types.h index f48b063..f1a505d 100644 --- a/src/ec/types.h +++ b/src/crypto/types.h @@ -21,8 +21,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef EOSIOKEYGEN_EC_TYPES_H -#define EOSIOKEYGEN_EC_TYPES_H +#ifndef EOSIOKEYGEN_CRYPTO_TYPES_H +#define EOSIOKEYGEN_CRYPTO_TYPES_H #include @@ -47,4 +47,4 @@ struct ec_keypair { } // namespace eoskeygen -#endif /* EOSIOKEYGEN_EC_TYPES_H */ +#endif /* EOSIOKEYGEN_CRYPTO_TYPES_H */ diff --git a/src/key_search.cpp b/src/key_search.cpp index a6a190c..12a3a11 100644 --- a/src/key_search.cpp +++ b/src/key_search.cpp @@ -22,7 +22,7 @@ * SOFTWARE. */ #include -#include "ec/generate.h" +#include "crypto/ec.h" #include "key_search_helpers.h" #include "key_search.h" diff --git a/src/key_search_helpers.h b/src/key_search_helpers.h index 5e8ff39..f3a6bd5 100644 --- a/src/key_search_helpers.h +++ b/src/key_search_helpers.h @@ -25,7 +25,7 @@ #define EOSIOKEYGEN_KEY_SEARCH_HELPERS_H #include "string.h" -#include "ec/types.h" +#include "crypto/types.h" namespace eoskeygen { diff --git a/src/key_search_mt.cpp b/src/key_search_mt.cpp index 2d01382..cc775c1 100644 --- a/src/key_search_mt.cpp +++ b/src/key_search_mt.cpp @@ -25,7 +25,7 @@ #include #include #include -#include "ec/generate.h" +#include "crypto/ec.h" #include "key_search_helpers.h" #include "key_search.h" diff --git a/src/main.cpp b/src/main.cpp index 2eed33c..3e16602 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,7 +28,7 @@ #include #include "string.h" #include "WIF.h" -#include "ec/generate.h" +#include "crypto/ec.h" #include "key_search.h" #include "benchmark.h"