#include "components/sync/engine/nigori/cross_user_sharing_public_private_key_pair.h"
#include <algorithm>
#include <vector>
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/boringssl/src/include/openssl/curve25519.h"
namespace syncer {
namespace {
TEST(CrossUserSharingPublicPrivateKeyPairTest,
GenerateNewKeyPairShouldAlwaysSucceed) { … }
TEST(CrossUserSharingPublicPrivateKeyPairTest,
GenerateNewKeyPairShouldGenerateDifferentKeys) { … }
TEST(CrossUserSharingPublicPrivateKeyPairTest,
GenerateNewKeyPairShouldGenerateDifferentPublicPrivateParts) { … }
TEST(CrossUserSharingPublicPrivateKeyPairTest,
GeneratedPublicKeyShouldMatchX25519Derivation) { … }
TEST(CrossUserSharingPublicPrivateKeyPairTest, CreateByImportShouldSucceed) { … }
TEST(CrossUserSharingPublicPrivateKeyPairTest,
CreateByImportShouldFailOnShorterKey) { … }
TEST(CrossUserSharingPublicPrivateKeyPairTest,
CreateByImportShouldFailOnLongerKey) { … }
TEST(CrossUserSharingPublicPrivateKeyPairTest, ShouldEncryptAndDecrypt) { … }
TEST(CrossUserSharingPublicPrivateKeyPairTest,
ShouldReturnEmptyOnDecryptingShortCipherText) { … }
TEST(CrossUserSharingPublicPrivateKeyPairTest,
ShouldReturnEmptyOnEncryptingForBadPeerKey) { … }
TEST(CrossUserSharingPublicPrivateKeyPairTest,
ShouldReturnEmptyOnDecryptingForBadPeerKey) { … }
TEST(CrossUserSharingPublicPrivateKeyPairTest,
ShouldReturnEmptyOnDecryptingCorruptedCipherText) { … }
}
}