/external/chromium/chrome/browser/safe_browsing/ |
D | safe_browsing_store.h | 71 SBFullHash full_hash; member 76 full_hash(h) { in SBAddFullHash() 82 : chunk_id(id), received(r), full_hash(h) {} in SBAddFullHash() 84 SBAddFullHash() : chunk_id(), received(), full_hash() {} in SBAddFullHash() 87 SBPrefix GetAddPrefix() const { return full_hash.prefix; } in GetAddPrefix() 93 SBFullHash full_hash; member 96 : chunk_id(id), add_chunk_id(add_id), full_hash(h) {} in SBSubFullHash() 97 SBSubFullHash() : chunk_id(), add_chunk_id(), full_hash() {} in SBSubFullHash() 100 SBPrefix GetAddPrefix() const { return full_hash.prefix; } in GetAddPrefix() 123 return memcmp(a.full_hash.full_hash, b.full_hash.full_hash, in SBAddPrefixHashLess() [all …]
|
D | safe_browsing_store_unittest.cc | 33 one.full_hash[sizeof(int32)] = 1; in TEST() 35 onetwo.full_hash[sizeof(int32)] = 2; in TEST() 84 one.full_hash[sizeof(int32)] = 1; in TEST() 86 onetwo.full_hash[sizeof(int32)] = 2; in TEST() 140 kHash1mod1.full_hash[sizeof(kHash1mod1.full_hash) - 1] ++; in TEST() 142 kHash1mod2.full_hash[sizeof(kHash1mod2.full_hash) - 1] ++; in TEST() 144 kHash1mod3.full_hash[sizeof(kHash1mod3.full_hash) - 1] ++; in TEST() 178 EXPECT_TRUE(SBFullHashEq(kHash2, add_hashes[0].full_hash)); in TEST() 188 EXPECT_TRUE(SBFullHashEq(kHash3, sub_hashes[0].full_hash)); in TEST() 203 kHash1mod1.full_hash[sizeof(kHash1mod1.full_hash) - 1] ++; in TEST() [all …]
|
D | safe_browsing_service_browsertest.cc | 262 SBFullHashResult* full_hash) { in GenUrlFullhashResult() argument 266 crypto::SHA256HashString(host + path, &full_hash->hash, in GenUrlFullhashResult() 268 full_hash->list_name = list_name; in GenUrlFullhashResult() 269 full_hash->add_chunk_id = add_chunk_id; in GenUrlFullhashResult() 275 SBFullHashResult* full_hash) { in GenDigestFullhashResult() argument 276 safe_browsing_util::StringToSBFullHash(full_digest, &full_hash->hash); in GenDigestFullhashResult() 277 full_hash->list_name = list_name; in GenDigestFullhashResult() 278 full_hash->add_chunk_id = add_chunk_id; in GenDigestFullhashResult() 311 void SetupResponseForUrl(const GURL& url, const SBFullHashResult& full_hash) { in SetupResponseForUrl() argument 313 prefix_hits.push_back(full_hash.hash.prefix); in SetupResponseForUrl() [all …]
|
D | safe_browsing_store_unittest_helper.h | 20 crypto::SHA256HashString(str, &h.full_hash, sizeof(h.full_hash)); in SBFullHashFromString() 27 return !memcmp(a.full_hash, b.full_hash, sizeof(a.full_hash)); in SBFullHashEq()
|
D | safe_browsing_util.h | 35 char full_hash[32]; member 40 return memcmp(lhash.full_hash, rhash.full_hash, sizeof(SBFullHash)) == 0; 44 return memcmp(lhash.full_hash, rhash.full_hash, sizeof(SBFullHash)) < 0; 199 void SetFullHashAt(int index, const SBFullHash& full_hash);
|
D | safe_browsing_database.cc | 92 SBFullHash full_hash; in BrowseFullHashesToCheck() local 93 crypto::SHA256HashString(hosts[i] + path, &full_hash, in BrowseFullHashesToCheck() 94 sizeof(full_hash)); in BrowseFullHashesToCheck() 95 full_hashes->push_back(full_hash); in BrowseFullHashesToCheck() 104 &full_hash, sizeof(full_hash)); in BrowseFullHashesToCheck() 105 full_hashes->push_back(full_hash); in BrowseFullHashesToCheck() 141 if (*piter < hiter->full_hash.prefix) { in GetCachedFullHashesForBrowse() 143 } else if (hiter->full_hash.prefix < *piter) { in GetCachedFullHashesForBrowse() 155 result.hash = hiter->full_hash; in GetCachedFullHashesForBrowse() 219 return a.full_hash.prefix < b.full_hash.prefix; in SBAddFullHashPrefixLess() [all …]
|
D | safe_browsing_util_unittest.cc | 285 SBFullHashResult full_hash; in TEST() local 287 &full_hash.hash, in TEST() 290 full_hashes.push_back(full_hash); in TEST() 344 EXPECT_EQ(0, memcmp(hash_in.data(), hash_out.full_hash, sizeof(SBFullHash))); in TEST()
|
D | safe_browsing_util.cc | 151 void SBEntry::SetFullHashAt(int index, const SBFullHash& full_hash) { in SetFullHashAt() argument 155 add_full_hashes_[index] = full_hash; in SetFullHashAt() 157 sub_full_hashes_[index].prefix = full_hash; in SetFullHashAt() 440 key.full_hash, in GetUrlHashIndex() 524 memcpy(hash_out->full_hash, hash_in.data(), crypto::SHA256_LENGTH); in StringToSBFullHash() 528 DCHECK_EQ(static_cast<size_t>(crypto::SHA256_LENGTH), sizeof(hash.full_hash)); in SBFullHashToString() 529 return std::string(hash.full_hash, sizeof(hash.full_hash)); in SBFullHashToString()
|
D | protocol_parser.cc | 93 SBFullHashResult full_hash; in ParseGetHash() local 94 full_hash.list_name = cmd_parts[0]; in ParseGetHash() 95 full_hash.add_chunk_id = atoi(cmd_parts[1].c_str()); in ParseGetHash() 99 if (safe_browsing_util::GetListId(full_hash.list_name) < 0) { in ParseGetHash() 107 memcpy(&full_hash.hash, data, sizeof(SBFullHash)); in ParseGetHash() 108 full_hashes->push_back(full_hash); in ParseGetHash()
|
D | safe_browsing_service.cc | 123 : full_hash(NULL), in SafeBrowsingCheck() 137 DCHECK(!check.full_hash.get()); in OnSafeBrowsingResult() 144 } else if (check.full_hash.get()) { in OnSafeBrowsingResult() 146 safe_browsing_util::SBFullHashToString(*check.full_hash), in OnSafeBrowsingResult() 226 bool SafeBrowsingService::CheckDownloadHash(const std::string& full_hash, in CheckDownloadHash() argument 229 DCHECK(!full_hash.empty()); in CheckDownloadHash() 230 if (!enabled_ || !enable_download_protection_ || full_hash.empty()) in CheckDownloadHash() 236 check->full_hash.reset(new SBFullHash); in CheckDownloadHash() 237 safe_browsing_util::StringToSBFullHash(full_hash, check->full_hash.get()); in CheckDownloadHash() 976 index = safe_browsing_util::GetHashIndex(*(check->full_hash), full_hashes); in HandleOneCheck() [all …]
|
D | protocol_parser_unittest.cc | 63 full_hash1.full_hash[i] = i % 2 ? 1 : 2; in TEST() 64 full_hash2.full_hash[i] = i % 2 ? 3 : 4; in TEST() 67 add_chunk.append(full_hash1.full_hash, 32); in TEST() 68 add_chunk.append(full_hash2.full_hash, 32); in TEST() 299 full_hash1.full_hash[i] = i % 2 ? 1 : 2; in TEST() 300 full_hash2.full_hash[i] = i % 2 ? 3 : 4; in TEST() 304 sub_chunk.append(full_hash1.full_hash, 32); in TEST() 306 sub_chunk.append(full_hash2.full_hash, 32); in TEST()
|
D | safe_browsing_store_file.h | 128 const SBFullHash& full_hash); 132 const SBFullHash& full_hash);
|
D | safe_browsing_service.h | 79 scoped_ptr<SBFullHash> full_hash; member 164 virtual bool CheckDownloadHash(const std::string& full_hash, Client* client);
|
D | safe_browsing_store_file.cc | 336 const SBFullHash& full_hash) { in WriteAddHash() argument 337 add_hashes_.push_back(SBAddFullHash(chunk_id, receive_time, full_hash)); in WriteAddHash() 349 const SBFullHash& full_hash) { in WriteSubHash() argument 350 sub_hashes_.push_back(SBSubFullHash(chunk_id, add_chunk_id, full_hash)); in WriteSubHash()
|
D | safe_browsing_store_unittest_helper.cc | 111 EXPECT_TRUE(SBFullHashEq(kHash2, add_full_hashes_result[0].full_hash)); in SafeBrowsingStoreTestStorePrefix() 145 EXPECT_TRUE(SBFullHashEq(kHash2, add_full_hashes_result[0].full_hash)); in SafeBrowsingStoreTestStorePrefix() 284 EXPECT_TRUE(SBFullHashEq(kHash3, add_full_hashes_result[0].full_hash)); in SafeBrowsingStoreTestDeleteChunks()
|
D | safe_browsing_database_unittest.cc | 828 SBFullHashResult full_hash; in PopulateDatabaseForCacheTest() local 829 full_hash.hash = Sha256Hash("www.evil.com/phishing.html"); in PopulateDatabaseForCacheTest() 830 full_hash.list_name = safe_browsing_util::kMalwareList; in PopulateDatabaseForCacheTest() 831 full_hash.add_chunk_id = 1; in PopulateDatabaseForCacheTest() 834 results.push_back(full_hash); in PopulateDatabaseForCacheTest() 836 full_hash.hash = Sha256Hash("www.evil.com/malware.html"); in PopulateDatabaseForCacheTest() 837 results.push_back(full_hash); in PopulateDatabaseForCacheTest() 932 if (iter->full_hash.prefix == key) { in TEST_F()
|
/external/open-vcdiff/src/ |
D | rolling_hash.h | 151 static uint32_t RemoveFirstByteFromHash(uint32_t full_hash, in RemoveFirstByteFromHash() argument 153 return RollingHashUtil::ModBase(full_hash + remove_table_[first_byte]); in RemoveFirstByteFromHash()
|
/external/chromium/sdch/open-vcdiff/src/ |
D | rolling_hash.h | 152 static uint32_t RemoveFirstByteFromHash(uint32_t full_hash, in RemoveFirstByteFromHash() argument 154 return RollingHashUtil::ModBase(full_hash + remove_table_[first_byte]); in RemoveFirstByteFromHash()
|
/external/e2fsprogs/lib/ext2fs/ |
D | tdb.c | 175 u32 full_hash; /* the full 32 bit hash of the key */ member 2924 tdb->travlocks.hash = BUCKET(rec.full_hash); in tdb_nextkey() 2965 rec.full_hash, rec.magic); in tdb_dump_record() 3122 if (!TDB_DEAD(r) && hash==r->full_hash in tdb_find() 3201 tdb_unlock(tdb, BUCKET(rec.full_hash), F_RDLCK); in tdb_fetch() 3241 tdb_unlock(tdb, BUCKET(rec.full_hash), F_RDLCK); in tdb_parse_record() 3258 tdb_unlock(tdb, BUCKET(rec.full_hash), F_RDLCK); in tdb_exists_hash() 3285 if (tdb_ofs_read(tdb, TDB_HASH_TOP(rec->full_hash), &i) == -1) in tdb_do_delete() 3293 last_ptr = TDB_HASH_TOP(rec->full_hash); in tdb_do_delete() 3411 if (tdb_unlock(tdb, BUCKET(rec.full_hash), F_WRLCK) != 0) in tdb_delete_hash() [all …]
|