Lines Matching refs:provider_
52 CryptoProvider provider_;
63 EXPECT_EQ(CryptoProvider::kKeyMatterFile, provider_.key_matter_file_.value());
65 provider_.set_key_matter_file(FilePath("/some/non/existent/file"));
66 provider_.Init();
67 ASSERT_EQ(1, provider_.cryptos_.size());
68 EXPECT_EQ(CryptoROT47::kID, provider_.cryptos_[0]->GetID());
72 provider_.set_key_matter_file(InitKeyMatterFile(temp_dir.path()));
73 provider_.Init();
74 ASSERT_EQ(2, provider_.cryptos_.size());
75 EXPECT_EQ(CryptoDESCBC::kID, provider_.cryptos_[0]->GetID());
76 EXPECT_EQ(CryptoROT47::kID, provider_.cryptos_[1]->GetID());
78 provider_.set_key_matter_file(FilePath("/other/missing/file"));
79 provider_.Init();
80 ASSERT_EQ(1, provider_.cryptos_.size());
81 EXPECT_EQ(CryptoROT47::kID, provider_.cryptos_[0]->GetID());
85 EXPECT_EQ(kPlainText, provider_.Encrypt(kPlainText));
86 EXPECT_EQ(kEmptyText, provider_.Encrypt(kEmptyText));
88 provider_.Init();
89 EXPECT_EQ(kROT47Text, provider_.Encrypt(kPlainText));
93 provider_.set_key_matter_file(InitKeyMatterFile(temp_dir.path()));
94 provider_.Init();
95 EXPECT_EQ(kROT47Text, provider_.Encrypt(kPlainText));
99 EXPECT_EQ(kPlainText, provider_.Decrypt(kPlainText));
100 EXPECT_EQ(kEmptyText, provider_.Decrypt(kEmptyText));
104 provider_.set_key_matter_file(InitKeyMatterFile(temp_dir.path()));
105 provider_.Init();
106 EXPECT_EQ(kPlainText, provider_.Decrypt(kROT47Text));
107 EXPECT_EQ(kPlainText, provider_.Decrypt(kDESCBCText));
108 EXPECT_EQ(kPlainText, provider_.Decrypt(kPlainText));
109 EXPECT_EQ(kEmptyText, provider_.Decrypt(kEmptyText));