Lines Matching refs:std
30 const Hash &Hash::getHash(const std::string &path) { in getHash()
31 static std::map<std::string, Hash> hashes; in getHash()
42 static std::vector<uint8_t> sha256File(const std::string &path) { in sha256File()
43 std::ifstream stream(path); in sha256File()
44 std::stringstream fileStream; in sha256File()
46 std::string fileContent = fileStream.str(); in sha256File()
48 std::vector<uint8_t> ret = std::vector<uint8_t>(SHA256_DIGEST_LENGTH); in sha256File()
56 Hash::Hash(const std::string &path) in Hash()
60 std::string Hash::hexString(const std::vector<uint8_t> &hash) { in hexString()
61 std::ostringstream s; in hexString()
62 s << std::hex << std::setfill('0'); in hexString()
64 s << std::setw(2) << static_cast<int>(i); in hexString()
69 std::string Hash::hexString() const { in hexString()
73 const std::vector<uint8_t> &Hash::raw() const { in raw()
77 const std::string &Hash::getPath() const { in getPath()
86 static const std::regex kHashLine(
93 static const HashFile *parse(const std::string &path, std::string *err) { in parse()
94 static std::map<std::string, HashFile*> hashfiles; in parse()
104 std::vector<std::string> lookup(const std::string &fqName) const { in lookup()
115 static HashFile *readHashFile(const std::string &path, std::string *err) { in readHashFile()
116 std::ifstream stream(path); in readHashFile()
124 std::string line; in readHashFile()
125 while(std::getline(stream, line)) { in readHashFile()
126 std::smatch match; in readHashFile()
127 bool valid = std::regex_match(line, match, kHashLine); in readHashFile()
137 std::string hash = match.str(1); in readHashFile()
138 std::string fqName = match.str(2); in readHashFile()
155 std::string path;
156 std::map<std::string,std::vector<std::string>> hashes;
160 std::vector<std::string> Hash::lookupHash(const std::string &path, in lookupHash()
161 const std::string &interfaceName, in lookupHash()
162 std::string *err) { in lookupHash()