Home
last modified time | relevance | path

Searched refs:hash (Results 1 – 25 of 82) sorted by relevance

1234

/system/core/libutils/
DJenkinsHash.cpp30 hash_t JenkinsHashWhiten(uint32_t hash) { in JenkinsHashWhiten() argument
31 hash += (hash << 3); in JenkinsHashWhiten()
32 hash ^= (hash >> 11); in JenkinsHashWhiten()
33 hash += (hash << 15); in JenkinsHashWhiten()
34 return hash; in JenkinsHashWhiten()
37 uint32_t JenkinsHashMixBytes(uint32_t hash, const uint8_t* bytes, size_t size) { in JenkinsHashMixBytes() argument
41 hash = JenkinsHashMix(hash, (uint32_t)size); in JenkinsHashMixBytes()
45 hash = JenkinsHashMix(hash, data); in JenkinsHashMixBytes()
51 hash = JenkinsHashMix(hash, data); in JenkinsHashMixBytes()
53 return hash; in JenkinsHashMixBytes()
[all …]
/system/core/include/utils/
DJenkinsHash.h35 inline uint32_t JenkinsHashMix(uint32_t hash, uint32_t data) { in JenkinsHashMix() argument
36 hash += data; in JenkinsHashMix()
37 hash += (hash << 10); in JenkinsHashMix()
38 hash ^= (hash >> 6); in JenkinsHashMix()
39 return hash; in JenkinsHashMix()
42 hash_t JenkinsHashWhiten(uint32_t hash);
45 uint32_t JenkinsHashMixBytes(uint32_t hash, const uint8_t* bytes, size_t size);
47 uint32_t JenkinsHashMixShorts(uint32_t hash, const uint16_t* shorts, size_t size);
/system/core/libcutils/
Dhashmap.c29 int hash; member
37 int (*hash)(void* key); member
44 int (*hash)(void* key), bool (*equals)(void* keyA, void* keyB)) { in hashmapCreate()
45 assert(hash != NULL); in hashmapCreate()
69 map->hash = hash; in hashmapCreate()
84 int h = map->hash(key); in hashKey()
100 static inline size_t calculateIndex(size_t bucketCount, int hash) { in calculateIndex() argument
101 return ((size_t) hash) & (bucketCount - 1); in calculateIndex()
121 size_t index = calculateIndex(newBucketCount, entry->hash); in expandIfNecessary()
173 static Entry* createEntry(void* key, int hash, void* value) { in createEntry() argument
[all …]
Dstr_parms.c64 uint32_t hash = 5381; in str_hash_fn() local
68 hash = ((hash << 5) + hash) + *p; in str_hash_fn()
69 return (int)hash; in str_hash_fn()
/system/core/crash_reporter/
Dwarn_collector.l114 uint32_t hash = 0; in StringHash() local
116 hash = (hash << 5) + hash + *string++; in StringHash()
118 return hash; in StringHash()
126 static int HashSeen(uint32_t hash) { in HashSeen() argument
127 int word_index = (hash & HASH_BITMAP_MASK) / 32; in HashSeen()
128 int bit_index = (hash & HASH_BITMAP_MASK) % 32; in HashSeen()
132 static void SetHashSeen(uint32_t hash) { in SetHashSeen() argument
133 int word_index = (hash & HASH_BITMAP_MASK) / 32; in SetHashSeen()
134 int bit_index = (hash & HASH_BITMAP_MASK) % 32; in SetHashSeen()
140 uint32_t hash; in WarnStart() local
[all …]
Dkernel_collector.cc312 unsigned hash = 0; in HashString() local
314 hash = hash * 16127 + input[i]; in HashString()
315 return hash; in HashString()
321 unsigned *hash, in ProcessStackTrace() argument
350 *hash = 0; in ProcessStackTrace()
402 *hash = HashString(hashable); in ProcessStackTrace()
/system/bt/osi/src/
Dhash_functions.c36 hash_index_t hash = 5381; in hash_function_string() local
40 hash = ((hash << 5) + hash ) + name[i]; in hash_function_string()
41 return hash; in hash_function_string()
/system/update_engine/
Domaha_response_handler_action_unittest.cc105 SetString(kPrefsUpdateCheckResponseHash, in.hash)) in DoTest()
149 in.hash = "HASH+"; in TEST_F()
156 EXPECT_EQ(in.hash, install_plan.payload_hash); in TEST_F()
174 in.hash = "HASHj+"; in TEST_F()
182 EXPECT_EQ(in.hash, install_plan.payload_hash); in TEST_F()
195 in.hash = "HASHj+"; in TEST_F()
203 EXPECT_EQ(in.hash, install_plan.payload_hash); in TEST_F()
226 in.hash = "HASHj+"; in TEST_F()
235 EXPECT_EQ(in.hash, install_plan.payload_hash); in TEST_F()
246 in.hash = "HASHj+"; in TEST_F()
[all …]
/system/bt/btcore/src/
Dbdaddr.c96 hash_index_t hash = 5381; in hash_function_bdaddr() local
99 hash = ((hash << 5) + hash) + bytes[i]; in hash_function_bdaddr()
100 return hash; in hash_function_bdaddr()
/system/tpm/trunks/
Dtpm_generated.cc3030 result = Serialize_TPMI_ALG_HASH(value.hash, buffer); in Serialize_TPMS_PCR_SELECTION()
3061 &value->hash, in Parse_TPMS_PCR_SELECTION()
7356 result = Serialize_TPMI_ALG_HASH(value.hash, buffer); in Serialize_TPMS_SIGNATURE_RSASSA()
7377 &value->hash, in Parse_TPMS_SIGNATURE_RSASSA()
7399 result = Serialize_TPMI_ALG_HASH(value.hash, buffer); in Serialize_TPMS_SIGNATURE_RSAPSS()
7420 &value->hash, in Parse_TPMS_SIGNATURE_RSAPSS()
7442 result = Serialize_TPMI_ALG_HASH(value.hash, buffer); in Serialize_TPMS_SIGNATURE_ECDSA()
7468 &value->hash, in Parse_TPMS_SIGNATURE_ECDSA()
9440 scoped_ptr<crypto::SecureHash> hash(crypto::SecureHash::Create( in SerializeCommand_Startup() local
9442 hash->Update(command_code_bytes.data(), in SerializeCommand_Startup()
[all …]
/system/update_engine/payload_consumer/
Dpayload_verifier.cc173 bool PayloadVerifier::PadRSA2048SHA256Hash(brillo::Blob* hash) { in PadRSA2048SHA256Hash() argument
174 TEST_AND_RETURN_FALSE(hash->size() == 32); in PadRSA2048SHA256Hash()
175 hash->insert(hash->begin(), in PadRSA2048SHA256Hash()
179 TEST_AND_RETURN_FALSE(hash->size() == 256); in PadRSA2048SHA256Hash()
/system/ca-certificates/
DREADME.cacerts1 The filenames in the cacerts directory are in the format of <hash>.<n>
2 where "hash" is the subject hash produced by:
/system/core/metricsd/uploader/
Dmetrics_hashes.cc28 inline uint64_t HashToUInt64(const std::string& hash) { in HashToUInt64() argument
30 DCHECK_GE(hash.size(), sizeof(value)); in HashToUInt64()
31 memcpy(&value, hash.data(), sizeof(value)); in HashToUInt64()
Dmetrics_hashes_unittest.cc38 uint64_t hash = HashMetricName(cases[i].input); in TEST() local
39 std::string hash_hex = base::StringPrintf("0x%016" PRIx64, hash); in TEST()
Dsender_http.cc31 const std::string hash = in Send() local
34 brillo::http::HeaderList headers = {{"X-Chrome-UMA-Log-SHA1", hash}}; in Send()
/system/extras/libfec/
Dfec_verity.cpp121 uint8_t *hash) in verity_hash() argument
133 check(hash); in verity_hash()
134 SHA256_Final(hash, &ctx); in verity_hash()
146 uint8_t hash[SHA256_DIGEST_LENGTH]; in verity_check_block() local
148 if (unlikely(verity_hash(f, block, hash) == -1)) { in verity_check_block()
154 return !memcmp(expected, hash, SHA256_DIGEST_LENGTH); in verity_check_block()
160 uint8_t *hash, uint64_t data_offset, uint8_t *data) in ecc_read_hashes() argument
164 if (hash && fec_pread(f, hash, SHA256_DIGEST_LENGTH, hash_offset) != in ecc_read_hashes()
188 uint8_t hash[SHA256_DIGEST_LENGTH]; in verify_tree() local
270 if (!raw_pread(f, hash, SHA256_DIGEST_LENGTH, in verify_tree()
[all …]
Dfec_read.cpp80 return !verity_check_block(f, &f->verity.hash[n * SHA256_DIGEST_LENGTH], in is_erasure()
89 if (!v->hash || unlikely(offset >= f->data_size)) { in is_zero()
100 return !memcmp(v->zero_hash, &v->hash[hash_offset], SHA256_DIGEST_LENGTH); in is_zero()
120 check(!use_erasures || f->verity.hash); in __ecc_read()
181 } else if (!f->verity.hash) { in __ecc_read()
290 check(f->verity.hash); in verity_read()
313 uint8_t *hash = &f->verity.hash[curr * SHA256_DIGEST_LENGTH]; in verity_read() local
331 if (likely(verity_check_block(f, hash, data))) { in verity_read()
356 verity_check_block(f, hash, data)) { in verity_read()
363 verity_check_block(f, hash, data)) { in verity_read()
[all …]
/system/update_engine/common/
Dhash_calculator_unittest.cc55 EXPECT_EQ(kExpectedHash, calc.hash()); in TEST_F()
66 EXPECT_EQ(kExpectedHash, calc.hash()); in TEST_F()
81 EXPECT_EQ(kExpectedHash, calc_next.hash()); in TEST_F()
109 EXPECT_EQ("NZf8k6SPBkYMvhaX8YgzuMgbkLP1XZ+neM8K5wcSsf8=", calc.hash()); in TEST_F()
124 EXPECT_EQ(kExpectedHash, calc.hash()); in TEST_F()
135 EXPECT_EQ("qqlAJmTxpB9A67xSyZk+tmrrNmYClY/fqig7ceZNsSM=", calc.hash()); in TEST_F()
/system/core/libmincrypt/test/
Drsa_test.c800 unsigned char hash[SHA_DIGEST_SIZE]; in main() local
809 SHA_hash(message, mlen, hash); \ in main()
811 int result = RSA_verify(&key_15, signature, slen, hash, sizeof(hash)); \ in main()
Decdsa_test.c227 p256_int hash; in main() local
268 p256_from_bin(hash_buf, &hash); \ in main()
271 if (result) { result = p256_ecdsa_verify(&key_x, &key_y, &hash, &r, &s); } \ in main()
/system/extras/ext4_utils/
Dcontents.c344 u32 hash = 0; in ext4_xattr_hash_entry() local
349 hash = (hash << NAME_HASH_SHIFT) ^ in ext4_xattr_hash_entry()
350 (hash >> (8*sizeof(hash) - NAME_HASH_SHIFT)) ^ in ext4_xattr_hash_entry()
359 hash = (hash << VALUE_HASH_SHIFT) ^ in ext4_xattr_hash_entry()
360 (hash >> (8*sizeof(hash) - VALUE_HASH_SHIFT)) ^ in ext4_xattr_hash_entry()
364 entry->e_hash = cpu_to_le32(hash); in ext4_xattr_hash_entry()
/system/core/include/mincrypt/
Dhash-internal.h42 const uint8_t* (* const hash)(const void*, int, uint8_t*); member
56 #define HASH_hash(data, len, digest) (ctx)->f->hash(data, len, digest)
/system/core/libmemunreachable/
DLeak.h30 struct hash<Leak::Backtrace> {
45 std::hash<T> hasher;
/system/bt/service/common/bluetooth/
Dgatt_identifier.h94 friend struct std::hash<bluetooth::GattIdentifier>;
120 struct hash<bluetooth::GattIdentifier> {
139 std::hash<T> hasher;
/system/extras/ksmutils/
Dksminfo.c48 uint32_t hash; member
202 uint32_t hash; in read_pages() local
259 hash = hashword(data, pm_kernel_pagesize(ker) / sizeof(*data), 17); in read_pages()
262 if (kp->pages[k].hash == hash) break; in read_pages()
285 kp->pages[kp->len].hash = hash; in read_pages()
352 printf("KSM CRC 0x%08x:", kp->pages[i].hash); in print_pages()

1234