Lines Matching refs:std

99 static bool ReadBlockDevice(const std::string &blk_device, size_t count,  in ReadBlockDevice()
100 std::vector<uint8_t> *data) { in ReadBlockDevice()
102 std::unique_ptr<void, void (*)(void *)> buf_mem( in ReadBlockDevice()
121 *data = std::vector<uint8_t>(buffer, buffer + count); in ReadBlockDevice()
148 bool CreateTestDevice(const std::string &cipher,
149 const std::vector<uint8_t> &key, bool is_wrapped_key);
150 void VerifyDecryption(const std::vector<uint8_t> &key, const Cipher &cipher);
151 void DoTest(const std::string &cipher_string, const Cipher &cipher);
154 std::string raw_blk_device_;
155 std::string dm_device_path_;
187 bool DmDefaultKeyTest::CreateTestDevice(const std::string &cipher, in CreateTestDevice()
188 const std::vector<uint8_t> &key, in CreateTestDevice()
191 std::unique_ptr<DmTargetDefaultKey> target = in CreateTestDevice()
192 std::make_unique<DmTargetDefaultKey>(0, kTestDataBytes / kDmApiSectorSize, in CreateTestDevice()
199 if (!table.AddTarget(std::move(target))) { in CreateTestDevice()
208 std::chrono::seconds(5))) { in CreateTestDevice()
222 void DmDefaultKeyTest::VerifyDecryption(const std::vector<uint8_t> &key, in VerifyDecryption()
224 std::vector<uint8_t> raw_data; in VerifyDecryption()
225 std::vector<uint8_t> decrypted_data; in VerifyDecryption()
237 std::unique_ptr<__le64> iv(new (::operator new(cipher.ivsize())) __le64); in VerifyDecryption()
241 std::vector<uint8_t> encrypted_data(kTestDataBytes); in VerifyDecryption()
255 void DmDefaultKeyTest::DoTest(const std::string &cipher_string, in DoTest()
259 std::vector<uint8_t> key = GenerateTestKey(cipher.keysize()); in DoTest()
281 std::vector<uint8_t> master_key, exported_key; in TEST_F()
286 std::vector<uint8_t> enc_key; in TEST_F()
320 std::vector<uint8_t> raw_data; in TEST()