aboutsummaryrefslogtreecommitdiff
path: root/tests/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/crypto')
-rw-r--r--tests/crypto/CMakeLists.txt3
-rw-r--r--tests/crypto/crypto.cpp12
2 files changed, 9 insertions, 6 deletions
diff --git a/tests/crypto/CMakeLists.txt b/tests/crypto/CMakeLists.txt
index df96c57cc..c89049d50 100644
--- a/tests/crypto/CMakeLists.txt
+++ b/tests/crypto/CMakeLists.txt
@@ -42,7 +42,10 @@ add_executable(cncrypto-tests
${crypto_headers})
target_link_libraries(cncrypto-tests
PRIVATE
+ wallet
+ cryptonote_core
common
+ device
${Boost_SYSTEM_LIBRARY}
${EXTRA_LIBRARIES})
set_property(TARGET cncrypto-tests
diff --git a/tests/crypto/crypto.cpp b/tests/crypto/crypto.cpp
index 6a1dd1b29..90212bd0b 100644
--- a/tests/crypto/crypto.cpp
+++ b/tests/crypto/crypto.cpp
@@ -33,7 +33,7 @@
#include "crypto-tests.h"
bool check_scalar(const crypto::ec_scalar &scalar) {
- return crypto::sc_check(crypto::operator &(scalar)) == 0;
+ return sc_check(crypto::operator &(scalar)) == 0;
}
void random_scalar(crypto::ec_scalar &res) {
@@ -45,13 +45,13 @@ void hash_to_scalar(const void *data, std::size_t length, crypto::ec_scalar &res
}
void hash_to_point(const crypto::hash &h, crypto::ec_point &res) {
- crypto::ge_p2 point;
- crypto::ge_fromfe_frombytes_vartime(&point, reinterpret_cast<const unsigned char *>(&h));
- crypto::ge_tobytes(crypto::operator &(res), &point);
+ ge_p2 point;
+ ge_fromfe_frombytes_vartime(&point, reinterpret_cast<const unsigned char *>(&h));
+ ge_tobytes(crypto::operator &(res), &point);
}
void hash_to_ec(const crypto::public_key &key, crypto::ec_point &res) {
- crypto::ge_p3 tmp;
+ ge_p3 tmp;
crypto::hash_to_ec(key, tmp);
- crypto::ge_p3_tobytes(crypto::operator &(res), &tmp);
+ ge_p3_tobytes(crypto::operator &(res), &tmp);
}