Lines Matching refs:cipher
146 bool CreateTestDevice(const std::string &cipher,
148 void VerifyDecryption(const std::vector<uint8_t> &key, const Cipher &cipher);
149 void DoTest(const std::string &cipher_string, const Cipher &cipher);
188 bool DmDefaultKeyTest::CreateTestDevice(const std::string &cipher, in CreateTestDevice() argument
194 cipher.c_str(), BytesToHex(key), in CreateTestDevice()
212 << cipher << "\", is_wrapped_key=" << is_wrapped_key in CreateTestDevice()
217 << " using cipher=\"" << cipher in CreateTestDevice()
224 const Cipher &cipher) { in VerifyDecryption() argument
237 ASSERT_GE(cipher.ivsize(), sizeof(__le64)); in VerifyDecryption()
238 std::unique_ptr<__le64> iv(new (::operator new(cipher.ivsize())) __le64); in VerifyDecryption()
239 memset(iv.get(), 0, cipher.ivsize()); in VerifyDecryption()
245 ASSERT_TRUE(cipher.Encrypt(key, reinterpret_cast<const uint8_t *>(iv.get()), in VerifyDecryption()
257 const Cipher &cipher) { in DoTest() argument
260 std::vector<uint8_t> key = GenerateTestKey(cipher.keysize()); in DoTest()
264 VerifyDecryption(key, cipher); in DoTest()