Lines Matching refs:std

45 bool HexToBytes(const std::string &hex, std::vector<uint8_t> *bytes) {  in HexToBytes()
64 std::string BytesToHex(const std::vector<uint8_t> &bytes) { in BytesToHex()
65 std::string retval; in BytesToHex()
74 std::unique_ptr<ShaHasher> CreateShaHasher(const std::string &algorithm) { in CreateShaHasher()
76 return std::make_unique<ShaHasherImpl<SHA_CTX>>( in CreateShaHasher()
80 return std::make_unique<ShaHasherImpl<SHA256_CTX>>( in CreateShaHasher()
84 return std::make_unique<ShaHasherImpl<SHA512_CTX>>( in CreateShaHasher()
90 static std::optional<std::string> ReadCommandToString(const std::string &command) { in ReadCommandToString()
91 std::unique_ptr<FILE, decltype(&pclose)> cmd_out_stream(popen(command.c_str(), "re"), in ReadCommandToString()
96 return std::nullopt; in ReadCommandToString()
102 return std::nullopt; in ReadCommandToString()
105 std::string output; in ReadCommandToString()
108 return std::nullopt; in ReadCommandToString()
115 static bool DeviceSupportsFeature(const std::string &feature) { in DeviceSupportsFeature()
116 std::optional<std::string> features = ReadCommandToString("pm list features"); in DeviceSupportsFeature()
122 return features.value().find(feature) != std::string::npos; in DeviceSupportsFeature()
126 static bool DeviceHasPackage(const std::string &package_name) { in DeviceHasPackage()
127 std::optional<std::string> packages = ReadCommandToString("pm list packages"); in DeviceHasPackage()
133 return packages.value().find(package_name) != std::string::npos; in DeviceHasPackage()
171 if (config.toString().find("vrheadset") != std::string::npos) { in IsVrHeadsetDevice()
199 std::optional<std::string> package_dump = ReadCommandToString("pm dump com.android.vending"); in DeviceHasPlayStore()
204 const std::string playstore_user_cert = "F0:FD:6C:5B:41:0F:25:CB:25:C3:B5:" in DeviceHasPlayStore()
208 bool certified_playstore = package_dump.value().find(playstore_user_cert) != std::string::npos; in DeviceHasPlayStore()
244 bool ValidatePublicKeyBlob(const std::string &key_blob_to_validate) { in ValidatePublicKeyBlob()
250 const std::string exec_dir = android::base::GetExecutableDirectory(); in ValidatePublicKeyBlob()
251 std::vector<std::string> allowed_key_names = { in ValidatePublicKeyBlob()
255 std::vector<std::string> allowed_oem_key_names = { in ValidatePublicKeyBlob()
265 std::string allowed_key_blob; in ValidatePublicKeyBlob()
279 const std::vector<std::string> &api_level_props) { in ReadApiLevelProps()
320 uint32_t api_level = std::min(board_api_level, product_api_level); in GetVendorApiLevel()
328 std::optional<uint32_t> GetBoardApiLevel() { in GetBoardApiLevel()
332 return std::nullopt; in GetBoardApiLevel()