Searched defs:hash (Results 1 - 25 of 41) sorted by relevance

12

/system/core/include/utils/
H A DJenkinsHash.h17 /* Implementation of Jenkins one-at-a-time hash function. These choices are
29 /* The Jenkins hash of a sequence of 32 bit words A, B, C is:
35 inline uint32_t JenkinsHashMix(uint32_t hash, uint32_t data) { argument
36 hash += data;
37 hash += (hash << 10);
38 hash ^= (hash >> 6);
39 return hash;
42 hash_t JenkinsHashWhiten(uint32_t hash);
[all...]
/system/core/metricsd/uploader/mock/
H A Dsender_mock.cc23 bool SenderMock::Send(const std::string& content, const std::string& hash) { argument
/system/core/metricsd/uploader/
H A Dmetrics_hashes_unittest.cc38 uint64_t hash = HashMetricName(cases[i].input); local
39 std::string hash_hex = base::StringPrintf("0x%016" PRIx64, hash);
H A Dmetrics_hashes.cc27 // Converts the 8-byte prefix of an MD5 hash into a uint64 value.
28 inline uint64_t HashToUInt64(const std::string& hash) { argument
30 DCHECK_GE(hash.size(), sizeof(value));
31 memcpy(&value, hash.data(), sizeof(value));
38 // Create an MD5 hash of the given |name|, represented as a byte buffer
H A Dsender_http.cc31 const std::string hash = local
34 brillo::http::HeaderList headers = {{"X-Chrome-UMA-Log-SHA1", hash}};
H A Dmetrics_log_base.cc69 uint64_t hash = metrics::HashMetricName(value); local
73 // that happens, all we get to see (server side) is a hash of the histogram
77 VLOG(1) << "Metrics: Hash numeric [" << value << "]=[" << hash << "]"; local
79 return hash;
/system/bt/osi/src/
H A Dhash_functions.c36 hash_index_t hash = 5381; local
40 hash = ((hash << 5) + hash ) + name[i];
41 return hash;
/system/core/libutils/
H A DJenkinsHash.cpp17 /* Implementation of Jenkins one-at-a-time hash function. These choices are
30 hash_t JenkinsHashWhiten(uint32_t hash) { argument
31 hash += (hash << 3);
32 hash ^= (hash >> 11);
33 hash += (hash << 15);
34 return hash;
37 uint32_t JenkinsHashMixBytes(uint32_t hash, cons argument
56 JenkinsHashMixShorts(uint32_t hash, const uint16_t* shorts, size_t size) argument
[all...]
/system/update_engine/common/
H A Dhash_calculator.h30 // Omaha uses base64 encoded SHA-256 as the hash. This class provides a simple
31 // wrapper around OpenSSL providing such a formatted hash of data passed in.
34 // or more calls to hash().
47 // Updates the hash with up to |length| bytes of data from |file|. If |length|
49 // of bytes that the hash was updated with, or -1 on error.
54 // hash.
58 // Gets the hash. Finalize() must have been called.
59 const std::string& hash() const { function in class:chromeos_update_engine::HashCalculator
69 // Gets the current hash context. Note that the string will contain binary
73 // Sets the current hash contex
[all...]
/system/core/libmemunreachable/
H A DLeak.h25 // Custom std::hash specialization so that Leak::Backtrace can be used
30 struct hash<Leak::Backtrace> { struct in namespace:std
45 std::hash<T> hasher;
/system/bt/service/common/bluetooth/
H A Duuid.h97 // Custom std::hash specialization so that bluetooth::UUID can be used as a key
102 struct hash<bluetooth::UUID> { struct in namespace:std
105 std::hash<std::string> hash_fn;
H A Dgatt_identifier.h94 friend struct std::hash<bluetooth::GattIdentifier>;
96 // NOTE: Don't forget to update the std::hash specialization below if you
115 // Custom std::hash specialization so that bluetooth::GattIdentifier can be used
120 struct hash<bluetooth::GattIdentifier> { struct in namespace:std
139 std::hash<T> hasher;
/system/core/include/mincrypt/
H A Dhash-internal.h42 const uint8_t* (* const hash)(const void*, int, uint8_t*); member in struct:HASH_VTAB
56 #define HASH_hash(data, len, digest) (ctx)->f->hash(data, len, digest)
/system/update_engine/payload_consumer/
H A Dpayload_verifier.cc35 // padded hash will look as follows:
41 // bytes of actual data (i.e. the ASN.1 header complete with the hash) are
173 bool PayloadVerifier::PadRSA2048SHA256Hash(brillo::Blob* hash) { argument
174 TEST_AND_RETURN_FALSE(hash->size() == 32);
175 hash->insert(hash->begin(),
179 TEST_AND_RETURN_FALSE(hash->size() == 256);
/system/bt/btcore/src/
H A Dbdaddr.c96 hash_index_t hash = 5381; local
99 hash = ((hash << 5) + hash) + bytes[i];
100 return hash;
/system/core/libmincrypt/
H A Drsa.c183 // 20 bytes of hash go here.
189 // At the location of the bytes of the hash all 00 are hashed.
227 // 32 bytes of hash go here.
234 // At the location of the bytes of the hash all 00 are hashed.
242 // Verify a 2048-bit RSA PKCS1.5 signature against an expected hash.
244 // SHA_DIGEST_SIZE (== 20) to indicate a SHA-1 hash, or
245 // SHA256_DIGEST_SIZE (== 32) to indicate a SHA-256 hash. No other
252 const uint8_t *hash,
268 return 0; // Unsupported hash.
283 buf[i] ^= *hash
249 RSA_verify(const RSAPublicKey *key, const uint8_t *signature, const int len, const uint8_t *hash, const int hash_len) argument
[all...]
/system/update_engine/
H A Domaha_response.h46 std::string hash; member in struct:chromeos_update_engine::OmahaResponse
/system/core/libmincrypt/test/
H A Decdsa_test.c227 p256_int hash; local
268 p256_from_bin(hash_buf, &hash); \
271 if (result) { result = p256_ecdsa_verify(&key_x, &key_y, &hash, &r, &s); } \
H A Drsa_test.c800 unsigned char hash[SHA_DIGEST_SIZE]; local
809 SHA_hash(message, mlen, hash); \
811 int result = RSA_verify(&key_15, signature, slen, hash, sizeof(hash)); \
/system/core/libcutils/
H A Dhashmap.c29 int hash; member in struct:Entry
37 int (*hash)(void* key); member in struct:Hashmap
44 int (*hash)(void* key), bool (*equals)(void* keyA, void* keyB)) {
45 assert(hash != NULL);
69 map->hash = hash;
84 int h = map->hash(key);
100 static inline size_t calculateIndex(size_t bucketCount, int hash) { argument
101 return ((size_t) hash) & (bucketCount - 1);
121 size_t index = calculateIndex(newBucketCount, entry->hash);
173 createEntry(void* key, int hash, void* value) argument
197 int hash = hashKey(map, key); local
229 int hash = hashKey(map, key); local
244 int hash = hashKey(map, key); local
260 int hash = hashKey(map, key); local
292 int hash = hashKey(map, key); local
[all...]
H A Dstr_parms.c58 /* use djb hash unless we find it inadequate */
64 uint32_t hash = 5381; local
68 hash = ((hash << 5) + hash) + *p;
69 return (int)hash;
/system/extras/libfec/
H A Dfec_open.cpp191 uint8_t hash[SHA256_DIGEST_LENGTH]; local
192 SHA256_Final(hash, &ctx);
194 f->ecc.valid = !memcmp(hash, header.hash, SHA256_DIGEST_LENGTH);
427 if (f->verity.hash) {
428 delete[] f->verity.hash;
H A Dfec_private.h84 uint8_t *hash; member in struct:verity_info
H A Dfec_read.cpp80 return !verity_check_block(f, &f->verity.hash[n * SHA256_DIGEST_LENGTH],
89 if (!v->hash || unlikely(offset >= f->data_size)) {
100 return !memcmp(v->zero_hash, &v->hash[hash_offset], SHA256_DIGEST_LENGTH);
120 check(!use_erasures || f->verity.hash);
181 } else if (!f->verity.hash) {
282 verity hash tree; returns the number of corrections in `errors' */
290 check(f->verity.hash);
313 uint8_t *hash = &f->verity.hash[curr * SHA256_DIGEST_LENGTH]; local
331 if (likely(verity_check_block(f, hash, dat
[all...]
H A Dfec_verity.cpp87 /* computes the size of verity hash tree for `file_size' bytes and returns the
88 number of hash tree levels in `verity_levels,' and the number of hashes per
119 buffer `block', and copies the hash to `hash' */
121 uint8_t *hash)
133 check(hash);
134 SHA256_Final(hash, &ctx);
138 /* computes a verity hash for FEC_BLOCKSIZE bytes from buffer `block' and
146 uint8_t hash[SHA256_DIGEST_LENGTH]; local
148 if (unlikely(verity_hash(f, block, hash)
120 verity_hash(fec_handle *f, const uint8_t *block, uint8_t *hash) argument
159 ecc_read_hashes(fec_handle *f, uint64_t hash_offset, uint8_t *hash, uint64_t data_offset, uint8_t *data) argument
188 uint8_t hash[SHA256_DIGEST_LENGTH]; local
[all...]

Completed in 590 milliseconds

12