+// FIXME Remove me when we are no longer returning 8 byte MACS
+// We assert that what we return is 8 bytes, so lets test for that for now!
+TEST(MirCookieFactory, assert_8_bytes_for_mac)
+{
+ std::vector<uint8_t> secret{ 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0xde, 0x01 };
+ auto factory = mir::cookie::CookieFactory::create_from_secret(secret);
+ uint64_t mock_timestamp{0x322322322332};
+ auto mac = factory->timestamp_to_mac(mock_timestamp);
+
+ EXPECT_EQ(mac.size(), sizeof(uint64_t));
+}
sizeof(uint64_t) is not a synonym for 8 - although platforms with 16bit characters are of little interest to us.
+// FIXME Remove me when we are no longer returning 8 byte MACS Factory, assert_ 8_bytes_ for_mac) uint8_t> secret{ 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0xde, 0x01 }; :CookieFactory: :create_ from_secret( secret) ; 0x322322322332} ; >timestamp_ to_mac( mock_timestamp) ; EQ(mac. size(), sizeof(uint64_t));
+// We assert that what we return is 8 bytes, so lets test for that for now!
+TEST(MirCookie
+{
+ std::vector<
+ auto factory = mir::cookie:
+ uint64_t mock_timestamp{
+ auto mac = factory-
+
+ EXPECT_
+}
sizeof(uint64_t) is not a synonym for 8 - although platforms with 16bit characters are of little interest to us.