diff options
author | luigi1111 <luigi1111w@gmail.com> | 2018-08-15 17:17:34 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2018-08-15 17:17:34 -0500 |
commit | 5295e4eb82bbf019ae9fbd2757e39bd411aad414 (patch) | |
tree | 48671ab567efcf04f8cd73a728fdb96f67cdd14a /tests | |
parent | Merge pull request #4136 (diff) | |
parent | crypto: do not use boost::value_initialized to init null skey/pkey (diff) | |
download | monero-5295e4eb82bbf019ae9fbd2757e39bd411aad414.tar.xz |
Merge pull request #4137
63e342b crypto: move null_pkey/null_skey to the cpp file (moneromooo-monero)
0496c7c crypto: do not use boost::value_initialized to init null skey/pkey (moneromooo-monero)
Diffstat (limited to 'tests')
-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); +} |