Lines Matching refs:cipher
143 bool CreateTestDevice(const std::string &cipher,
145 void VerifyDecryption(const std::vector<uint8_t> &key, const Cipher &cipher);
146 void DoTest(const std::string &cipher_string, const Cipher &cipher);
185 bool DmDefaultKeyTest::CreateTestDevice(const std::string &cipher, in CreateTestDevice() argument
191 cipher.c_str(), BytesToHex(key), in CreateTestDevice()
209 << cipher << "\", is_wrapped_key=" << is_wrapped_key in CreateTestDevice()
214 << " using cipher=\"" << cipher in CreateTestDevice()
221 const Cipher &cipher) { in VerifyDecryption() argument
234 ASSERT_GE(cipher.ivsize(), sizeof(__le64)); in VerifyDecryption()
235 std::unique_ptr<__le64> iv(new (::operator new(cipher.ivsize())) __le64); in VerifyDecryption()
236 memset(iv.get(), 0, cipher.ivsize()); in VerifyDecryption()
242 ASSERT_TRUE(cipher.Encrypt(key, reinterpret_cast<const uint8_t *>(iv.get()), in VerifyDecryption()
254 const Cipher &cipher) { in DoTest() argument
257 std::vector<uint8_t> key = GenerateTestKey(cipher.keysize()); in DoTest()
261 VerifyDecryption(key, cipher); in DoTest()