diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-07-20 22:59:18 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-07-20 23:06:22 +0100 |
commit | 0496c7c91abbf8ec20cc70f383868957c6f9adc9 (patch) | |
tree | 474931dc5fac4d5935579c967c908faac4926c49 /tests/unit_tests/crypto.cpp | |
parent | crypto: move null_pkey/null_skey to the cpp file (diff) | |
download | monero-0496c7c91abbf8ec20cc70f383868957c6f9adc9.tar.xz |
crypto: do not use boost::value_initialized to init null skey/pkey
Diffstat (limited to 'tests/unit_tests/crypto.cpp')
-rw-r--r-- | tests/unit_tests/crypto.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit_tests/crypto.cpp b/tests/unit_tests/crypto.cpp index 4bed06173..9e1680568 100644 --- a/tests/unit_tests/crypto.cpp +++ b/tests/unit_tests/crypto.cpp @@ -73,3 +73,11 @@ TEST(Crypto, Ostream) EXPECT_TRUE(is_formatted<crypto::key_derivation>()); EXPECT_TRUE(is_formatted<crypto::key_image>()); } + +TEST(Crypto, null_keys) +{ + char zero[32]; + memset(zero, 0, 32); + ASSERT_EQ(memcmp(crypto::null_skey.data, zero, 32), 0); + ASSERT_EQ(memcmp(crypto::null_pkey.data, zero, 32), 0); +} |