Home
last modified time | relevance | path

Searched refs:full_hash (Results 1 – 17 of 17) sorted by relevance

/external/chromium_org/chrome/browser/safe_browsing/
Dsafe_browsing_store.h81 SBFullHash full_hash; member
84 : chunk_id(id), deprecated_received(), full_hash(h) {} in SBAddFullHash()
86 SBAddFullHash() : chunk_id(), deprecated_received(), full_hash() {} in SBAddFullHash()
89 SBPrefix GetAddPrefix() const { return full_hash.prefix; } in GetAddPrefix()
95 SBFullHash full_hash; member
98 : chunk_id(id), add_chunk_id(add_id), full_hash(h) {} in SBSubFullHash()
99 SBSubFullHash() : chunk_id(), add_chunk_id(), full_hash() {} in SBSubFullHash()
102 SBPrefix GetAddPrefix() const { return full_hash.prefix; } in GetAddPrefix()
125 return memcmp(a.full_hash.full_hash, b.full_hash.full_hash, in SBAddPrefixHashLess()
126 sizeof(a.full_hash.full_hash)) < 0; in SBAddPrefixHashLess()
[all …]
Ddatabase_manager_unittest.cc94 SBFullHashResult full_hash; in TEST_F() local
95 full_hash.hash = kMalwareHostHash; in TEST_F()
96 full_hash.list_id = static_cast<int>(safe_browsing_util::MALWARE); in TEST_F()
97 full_hashes.push_back(full_hash); in TEST_F()
101 SBFullHashResult full_hash; in TEST_F() local
102 full_hash.hash = kPhishingHostHash; in TEST_F()
103 full_hash.list_id = static_cast<int>(safe_browsing_util::PHISH); in TEST_F()
104 full_hashes.push_back(full_hash); in TEST_F()
Dsafe_browsing_util.h37 char full_hash[32]; member
42 return !memcmp(a.full_hash, b.full_hash, sizeof(a.full_hash)); in SBFullHashEqual()
46 return memcmp(a.full_hash, b.full_hash, sizeof(a.full_hash)) < 0; in SBFullHashLess()
Dsafe_browsing_store_unittest.cc33 hash.full_hash[sizeof(hash.full_hash) - 1] ^= mask; in ModifyHashAfterPrefix()
79 one.full_hash[sizeof(SBPrefix)] = 1; in TEST()
81 onetwo.full_hash[sizeof(SBPrefix)] = 2; in TEST()
128 one.full_hash[sizeof(SBPrefix)] = 1; in TEST()
130 onetwo.full_hash[sizeof(SBPrefix)] = 2; in TEST()
220 EXPECT_TRUE(SBFullHashEqual(kHash4, add_hashes[0].full_hash)); in TEST()
222 EXPECT_TRUE(SBFullHashEqual(kHash6, add_hashes[1].full_hash)); in TEST()
232 EXPECT_TRUE(SBFullHashEqual(kHash7, sub_hashes[0].full_hash)); in TEST()
277 EXPECT_TRUE(SBFullHashEqual(kHash6, add_hashes[0].full_hash)); in TEST()
343 EXPECT_TRUE(SBFullHashEqual(kHash1mod1, add_hashes[0].full_hash)); in TEST()
[all …]
Dsafe_browsing_util.cc26 crypto::SHA256HashString(str, &h.full_hash, sizeof(h.full_hash)); in SBFullHashForString()
132 SBFullHash full_hash; in FullHashAt() local
133 memcpy(&full_hash, chunk_data_->hashes().data() + i * sizeof(SBFullHash), in FullHashAt()
135 return full_hash; in FullHashAt()
493 memcpy(hash_out.full_hash, hash_in.data(), crypto::kSHA256Length); in StringToSBFullHash()
498 DCHECK_EQ(crypto::kSHA256Length, sizeof(hash.full_hash)); in SBFullHashToString()
499 return std::string(hash.full_hash, sizeof(hash.full_hash)); in SBFullHashToString()
Dprotocol_parser.cc177 SBFullHashResult full_hash; in ParseGetHash() local
178 full_hash.list_id = safe_browsing_util::GetListId(cmd_parts[0]); in ParseGetHash()
207 if (full_hash.list_id < 0) { in ParseGetHash()
213 if (!reader.GetData(&full_hash.hash, hash_len)) in ParseGetHash()
215 full_hashes->push_back(full_hash); in ParseGetHash()
Dsafe_browsing_database_unittest.cc115 const SBFullHash full_hash = SBFullHashForString(value); in AddChunkFullHashValue() local
118 &full_hash, sizeof(full_hash), in AddChunkFullHashValue()
170 const SBFullHash full_hash = SBFullHashForString(value); in SubChunkFullHashValue() local
173 &full_hash, sizeof(full_hash), in SubChunkFullHashValue()
183 SBFullHash full_hash; in AddChunkHashedIpValue() local
184 std::memcpy(&(full_hash.full_hash), full_hash_str.data(), sizeof(SBFullHash)); in AddChunkHashedIpValue()
187 &full_hash, sizeof(full_hash), in AddChunkHashedIpValue()
760 SBFullHashResult full_hash; in PopulateDatabaseForCacheTest() local
761 full_hash.hash = SBFullHashForString("www.evil.com/phishing.html"); in PopulateDatabaseForCacheTest()
762 full_hash.list_id = safe_browsing_util::MALWARE; in PopulateDatabaseForCacheTest()
[all …]
Dsafe_browsing_store_file.h146 const SBFullHash& full_hash) OVERRIDE;
150 const SBFullHash& full_hash) OVERRIDE;
Dsafe_browsing_store_file_unittest.cc191 EXPECT_TRUE(SBFullHashEqual(kHash4, add_full_hashes_result[0].full_hash)); in TEST_F()
276 EXPECT_TRUE(SBFullHashEqual(kHash4, add_full_hashes_result[0].full_hash)); in TEST_F()
299 EXPECT_TRUE(SBFullHashEqual(kHash4, add_full_hashes_result[0].full_hash)); in TEST_F()
323 EXPECT_TRUE(SBFullHashEqual(kHash4, add_full_hashes_result[0].full_hash)); in TEST_F()
389 EXPECT_TRUE(SBFullHashEqual(kHash6, add_full_hashes_result[0].full_hash)); in TEST_F()
662 EXPECT_TRUE(SBFullHashEqual(kHash4, add_hashes[0].full_hash)); in TEST_F()
769 EXPECT_TRUE(SBFullHashEqual(kHash2, add_hashes[0].full_hash)); in TEST_F()
845 EXPECT_TRUE(SBFullHashEqual(kHash2, add_hashes[0].full_hash)); in TEST_F()
923 EXPECT_TRUE(SBFullHashEqual(kHash2, add_hashes[0].full_hash)); in TEST_F()
953 EXPECT_TRUE(SBFullHashEqual(kHash2, add_hashes[0].full_hash)); in TEST_F()
Dsafe_browsing_database.cc734 SBFullHash full_hash = SBFullHashForString(url_to_check); in ContainsSideEffectFreeWhitelistUrl() local
745 return side_effect_free_whitelist_prefix_set_->Exists(full_hash); in ContainsSideEffectFreeWhitelistUrl()
1230 full_hash_results.push_back(add_full_hashes[i].full_hash); in UpdateBrowseStore()
1520 new_whitelist.push_back(it->full_hash); in LoadWhitelist()
1543 const char* full_hash = it->full_hash.full_hash; in LoadIpBlacklist() local
1544 DCHECK_EQ(crypto::kSHA256Length, arraysize(it->full_hash.full_hash)); in LoadIpBlacklist()
1547 std::string hashed_ip_prefix(full_hash, base::kSHA1Length); in LoadIpBlacklist()
1548 size_t prefix_size = static_cast<uint8>(full_hash[base::kSHA1Length]); in LoadIpBlacklist()
1564 << " raw:" << base::HexEncode(full_hash, crypto::kSHA256Length) in LoadIpBlacklist()
Dsafe_browsing_service_browsertest.cc375 SBFullHashResult* full_hash) { in GenUrlFullhashResult() argument
379 full_hash->hash = SBFullHashForString(host + path); in GenUrlFullhashResult()
380 full_hash->list_id = list_id; in GenUrlFullhashResult()
421 void SetupResponseForUrl(const GURL& url, const SBFullHashResult& full_hash) { in SetupResponseForUrl() argument
423 prefix_hits.push_back(full_hash.hash.prefix); in SetupResponseForUrl()
428 db->AddUrl(url, full_hash.list_id, prefix_hits); in SetupResponseForUrl()
431 pm->SetGetFullHashResponse(full_hash); in SetupResponseForUrl()
Dprotocol_parser_unittest.cc70 full_hash1.full_hash[i] = i % 2 ? '1' : '0'; in TEST()
71 full_hash2.full_hash[i] = i % 2 ? '3' : '2'; in TEST()
264 full_hash1.full_hash[i] = i % 2 ? '1' : '0'; in TEST()
265 full_hash2.full_hash[i] = i % 2 ? '3' : '2'; in TEST()
Dsafe_browsing_util_unittest.cc317 EXPECT_EQ(0, memcmp(hash_in.data(), hash_out.full_hash, sizeof(SBFullHash))); in TEST()
Dsafe_browsing_store_file.cc768 const SBFullHash& full_hash) { in WriteAddHash() argument
769 add_hashes_.push_back(SBAddFullHash(chunk_id, full_hash)); in WriteAddHash()
781 const SBFullHash& full_hash) { in WriteSubHash() argument
782 sub_hashes_.push_back(SBSubFullHash(chunk_id, add_chunk_id, full_hash)); in WriteSubHash()
/external/chromium_org/sdch/open-vcdiff/src/
Drolling_hash.h151 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_org/media/base/
Daudio_hash_unittest.cc125 AudioHash full_hash; in TEST_F() local
126 full_hash.Update(bus_one_.get(), bus_one_->frames()); in TEST_F()
140 EXPECT_EQ(full_hash.ToString(), half_hash.ToString()); in TEST_F()
/external/e2fsprogs/lib/ext2fs/
Dtdb.c173 u32 full_hash; /* the full 32 bit hash of the key */ member
2922 tdb->travlocks.hash = BUCKET(rec.full_hash); in tdb_nextkey()
2963 rec.full_hash, rec.magic); in tdb_dump_record()
3118 if (!TDB_DEAD(r) && hash==r->full_hash in tdb_find()
3197 tdb_unlock(tdb, BUCKET(rec.full_hash), F_RDLCK); in tdb_fetch()
3237 tdb_unlock(tdb, BUCKET(rec.full_hash), F_RDLCK); in tdb_parse_record()
3254 tdb_unlock(tdb, BUCKET(rec.full_hash), F_RDLCK); in tdb_exists_hash()
3281 if (tdb_ofs_read(tdb, TDB_HASH_TOP(rec->full_hash), &i) == -1) in tdb_do_delete()
3289 last_ptr = TDB_HASH_TOP(rec->full_hash); in tdb_do_delete()
3407 if (tdb_unlock(tdb, BUCKET(rec.full_hash), F_WRLCK) != 0) in tdb_delete_hash()
[all …]