Lines Matching refs:encrypter
74 QuicData* EncryptWithNonce(ChaCha20Poly1305TlsEncrypter* encrypter, in EncryptWithNonce() argument
78 size_t ciphertext_size = encrypter->GetCiphertextSize(plaintext.length()); in EncryptWithNonce()
81 if (!encrypter->Encrypt(nonce, associated_data, plaintext, in EncryptWithNonce()
92 ChaCha20Poly1305TlsEncrypter encrypter; in TEST_F() local
96 ASSERT_TRUE(encrypter.SetKey(key)); in TEST_F()
98 ASSERT_TRUE(encrypter.SetIV("abcdefghijkl")); in TEST_F()
106 ASSERT_TRUE(encrypter.EncryptPacket(packet_number, associated_data, plaintext, in TEST_F()
127 ChaCha20Poly1305TlsEncrypter encrypter; in TEST_F() local
128 ASSERT_TRUE(encrypter.SetKey(key)); in TEST_F()
130 &encrypter, fixed + iv, in TEST_F()
147 ChaCha20Poly1305TlsEncrypter encrypter; in TEST_F() local
148 EXPECT_EQ(1000u, encrypter.GetMaxPlaintextSize(1016)); in TEST_F()
149 EXPECT_EQ(100u, encrypter.GetMaxPlaintextSize(116)); in TEST_F()
150 EXPECT_EQ(10u, encrypter.GetMaxPlaintextSize(26)); in TEST_F()
154 ChaCha20Poly1305TlsEncrypter encrypter; in TEST_F() local
155 EXPECT_EQ(1016u, encrypter.GetCiphertextSize(1000)); in TEST_F()
156 EXPECT_EQ(116u, encrypter.GetCiphertextSize(100)); in TEST_F()
157 EXPECT_EQ(26u, encrypter.GetCiphertextSize(10)); in TEST_F()
161 ChaCha20Poly1305TlsEncrypter encrypter; in TEST_F() local
166 ASSERT_TRUE(encrypter.SetHeaderProtectionKey(key)); in TEST_F()
167 std::string mask = encrypter.GenerateHeaderProtectionMask(sample); in TEST_F()