message: added check that using different keys will fail
diff: @@ -2415,6 +2415,26 @@ TEST(Shared_EncryptionKeyCheck_2)
  SharedGroup sg3(path, false, SharedGroupOptions());
  }
  +// if opened by one key, it cannot be opened by a different key
  +TEST(Shared_EncryptionKeyCheck_3)
  +{
  + SHARED_GROUP_TEST_PATH(path);
  + const char* first_key = crypt_key(true);
  + char* second_key = new char[32];
  + memcpy(second_key, first_key, 32);
  + second_key[3] = ~second_key[3];
  + SharedGroup sg(path, false, SharedGroupOptions(first_key));
  + bool ok = false;
  + try {
  + SharedGroup sg_2(path, false, SharedGroupOptions(second_key));
  + } catch (std::runtime_error&) {
  + ok = true;
  + }
  + CHECK(ok);
  + SharedGroup sg3(path, false, SharedGroupOptions(first_key));
  + delete[] second_key;
  +}
  +
  #endif
  TEST(Shared_VersionCount)
  