crypto: do not use boost::value_initialized to init null skey/pkey

This commit is contained in:
moneromooo-monero 2018-07-20 22:59:18 +01:00
parent 63e342be84
commit 0496c7c91a
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
3 changed files with 10 additions and 3 deletions

View file

@ -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);
}