/aosp14/system/core/libutils/ |
H A D | JenkinsHash.cpp | 31 hash += (hash << 3); in JenkinsHashWhiten() 32 hash ^= (hash >> 11); in JenkinsHashWhiten() 33 hash += (hash << 15); in JenkinsHashWhiten() 34 return hash; in JenkinsHashWhiten() 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() 60 hash = JenkinsHashMix(hash, (uint32_t)size); in JenkinsHashMixShorts() 64 hash = JenkinsHashMix(hash, data); in JenkinsHashMixShorts() [all …]
|
/aosp14/frameworks/base/sax/java/android/sax/ |
H A D | Children.java | 31 int hash = uri.hashCode() * 31 + localName.hashCode(); in getOrCreate() local 32 int index = hash & 15; in getOrCreate() 37 current = new Child(parent, uri, localName, parent.depth + 1, hash); in getOrCreate() 44 if (current.hash == hash in getOrCreate() 56 current = new Child(parent, uri, localName, parent.depth + 1, hash); in getOrCreate() 66 int hash = uri.hashCode() * 31 + localName.hashCode(); in get() local 67 int index = hash & 15; in get() 74 if (current.hash == hash in get() 88 final int hash; field in Children.Child 92 int hash) { in Child() argument [all …]
|
/aosp14/system/core/libutils/include/utils/ |
H A D | JenkinsHash.h | 35 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);
|
/aosp14/system/core/libcutils/ |
H A D | hashmap.cpp | 29 int hash; member 37 int (*hash)(void* key); member 45 assert(hash != NULL); in hashmapCreate() 69 map->hash = hash; in hashmapCreate() 84 int h = map->hash(key); in hashKey() 175 entry->hash = hash; in createEntry() 193 int hash = hashKey(map, key); in hashmapPut() local 213 if (equalKeys(current->key, current->hash, key, hash, map->equals)) { in hashmapPut() 225 int hash = hashKey(map, key); in hashmapGet() local 230 if (equalKeys(entry->key, entry->hash, key, hash, map->equals)) { in hashmapGet() [all …]
|
/aosp14/frameworks/base/core/java/android/content/res/ |
H A D | ResourcesKey.java | 86 int hash = 17; in ResourcesKey() local 87 hash = 31 * hash + Objects.hashCode(mResDir); in ResourcesKey() 88 hash = 31 * hash + Arrays.hashCode(mSplitResDirs); in ResourcesKey() 89 hash = 31 * hash + Arrays.hashCode(mOverlayPaths); in ResourcesKey() 90 hash = 31 * hash + Arrays.hashCode(mLibDirs); in ResourcesKey() 91 hash = 31 * hash + Objects.hashCode(mDisplayId); in ResourcesKey() 92 hash = 31 * hash + Objects.hashCode(mOverrideConfiguration); in ResourcesKey() 93 hash = 31 * hash + Objects.hashCode(mCompatInfo); in ResourcesKey() 94 hash = 31 * hash + Arrays.hashCode(mLoaders); in ResourcesKey() 95 mHash = hash; in ResourcesKey()
|
/aosp14/frameworks/base/apex/jobscheduler/service/java/com/android/server/tare/ |
H A D | EconomyManagerInternal.java | 54 int hash = 0; in AnticipatedAction() local 55 hash = 31 * hash + actionId; in AnticipatedAction() 56 hash = 31 * hash + numInstantaneousCalls; in AnticipatedAction() 57 hash = 31 * hash + (int) (ongoingDurationMs ^ (ongoingDurationMs >>> 32)); in AnticipatedAction() 58 mHashCode = hash; in AnticipatedAction() 92 int hash = 0; in ActionBill() local 94 hash = 31 * hash + mAnticipatedActions.get(i).hashCode(); in ActionBill() 96 mHashCode = hash; in ActionBill()
|
/aosp14/frameworks/base/tools/aapt/ |
H A D | ResourceIdCache.cpp | 34 static inline uint32_t hashround(uint32_t hash, int c) { in hashround() argument 35 return ((hash << 5) + hash) + c; /* hash * 33 + c */ in hashround() 38 static uint32_t hash(const android::String16& hashableString) { in hash() function 39 uint32_t hash = 5381; in hash() local 41 while (int c = *str++) hash = hashround(hash, c); in hash() 42 return hash; in hash() 63 const uint32_t hashcode = hash(hashedName); in lookup() 91 const uint32_t hashcode = hash(hashedName); in store()
|
/aosp14/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ |
H A D | NotificationRecordLoggerTest.java | 80 assertEquals(0, SmallHash.hash(0)); in testSmallHash() 83 SmallHash.hash(maxHash)); in testSmallHash() 85 SmallHash.hash(17 * maxHash)); in testSmallHash() 87 SmallHash.hash(maxHash - 1)); in testSmallHash() 89 SmallHash.hash(-1)); in testSmallHash() 101 final int hash = SmallHash.hash(tag.hashCode()); in testGetNotificationIdHash() local 105 assertEquals(1 ^ hash, in testGetNotificationIdHash() 109 SmallHash.hash(-1 ^ tag.hashCode()), in testGetNotificationIdHash() 111 assertNotEquals(-1 ^ hash, in testGetNotificationIdHash() 112 SmallHash.hash(-1 ^ tag.hashCode())); in testGetNotificationIdHash() [all …]
|
/aosp14/frameworks/base/tools/powermodel/src/com/android/powermodel/ |
H A D | AttributionKey.java | 66 int hash = 7; in hashCode() local 67 hash = (31 * hash) + (mUid); in hashCode() 68 hash = (31 * hash) + (mPackages == null ? 0 : mPackages.hashCode()); in hashCode() 69 hash = (31 * hash) + (mSpecialApp == null ? 0 : mSpecialApp.hashCode()); in hashCode() 70 return hash; in hashCode()
|
/aosp14/system/core/fs_mgr/libfs_avb/ |
H A D | sha.h | 27 uint8_t hash[SHA256_DIGEST_LENGTH]; variable 39 SHA256_Final(hash, &sha256_ctx); in finalize() 40 return hash; in finalize() 47 uint8_t hash[SHA512_DIGEST_LENGTH]; variable 59 SHA512_Final(hash, &sha512_ctx); in finalize() 60 return hash; in finalize()
|
/aosp14/frameworks/base/services/backup/java/com/android/server/backup/ |
H A D | BackupPasswordManager.java | 187 BackupPasswordHash hash = getPasswordHashFileCodec().deserialize(); in loadStateFromFilesystem() local 188 mPasswordHash = hash.hash; in loadStateFromFilesystem() 189 mPasswordSalt = hash.salt; in loadStateFromFilesystem() 252 public String hash; field in BackupPasswordManager.BackupPasswordHash 255 BackupPasswordHash(String hash, byte[] salt) { in BackupPasswordHash() argument 256 this.hash = hash; in BackupPasswordHash() 294 dataOutputStream.writeUTF(backupPasswordHash.hash); in serialize() 303 String hash = dataInputStream.readUTF(); in deserialize() local 304 return new BackupPasswordHash(hash, salt); in deserialize()
|
/aosp14/frameworks/base/location/java/android/location/ |
H A D | Country.java | 222 int hash = mHashCode; in hashCode() local 223 if (hash == 0) { in hashCode() 224 hash = 17; in hashCode() 225 hash = hash * 13 + mCountryIso.hashCode(); in hashCode() 226 hash = hash * 13 + mSource; in hashCode() 227 mHashCode = hash; in hashCode()
|
/aosp14/frameworks/base/core/java/android/view/ |
H A D | DisplayAdjustments.java | 89 int hash = 17; in hashCode() local 90 hash = hash * 31 + Objects.hashCode(mCompatInfo); in hashCode() 91 hash = hash * 31 + Objects.hashCode(mConfiguration); in hashCode() 92 return hash; in hashCode()
|
/aosp14/frameworks/base/core/java/android/os/ |
H A D | Temperature.java | 177 int hash = mName.hashCode(); in hashCode() local 178 hash = 31 * hash + Float.hashCode(mValue); in hashCode() 179 hash = 31 * hash + mType; in hashCode() 180 hash = 31 * hash + mStatus; in hashCode() 181 return hash; in hashCode()
|
H A D | CoolingDevice.java | 138 int hash = mName.hashCode(); in hashCode() local 139 hash = 31 * hash + Long.hashCode(mValue); in hashCode() 140 hash = 31 * hash + mType; in hashCode() 141 return hash; in hashCode()
|
/aosp14/frameworks/base/tools/aapt2/process/ |
H A D | SymbolTable.h | 38 std::hash<std::string> str_hash; in hash_type() 39 android::hash_t hash = 0; in hash_type() local 40 hash = android::JenkinsHashMix(hash, (uint32_t)str_hash(name.package)); in hash_type() 41 hash = android::JenkinsHashMix(hash, (uint32_t)str_hash(name.type.name)); in hash_type() 42 hash = android::JenkinsHashMix(hash, (uint32_t)str_hash(name.entry)); in hash_type() 43 return hash; in hash_type()
|
/aosp14/frameworks/base/telephony/java/android/telephony/ |
H A D | SmsCbLocation.java | 116 int hash = mPlmn.hashCode(); in hashCode() local 117 hash = hash * 31 + mLac; in hashCode() 118 hash = hash * 31 + mCid; in hashCode() 119 return hash; in hashCode()
|
/aosp14/frameworks/base/tools/protologtool/tests/com/android/protolog/tool/ |
H A D | CodeUtilsTest.kt | 29 fun hash() { regex 30 assertEquals(-1259556708, CodeUtils.hash("Test.java:50", "test", 36 assertEquals(15793504, CodeUtils.hash("Test.java:10", "test2", 42 assertEquals(-731772463, CodeUtils.hash("Test.java:50", "test", 48 assertEquals(-2026343204, CodeUtils.hash("Test.java:50", "test2", 54 assertEquals(1607870166, CodeUtils.hash("Test.java:50", "test2",
|
H A D | ViewerConfigBuilderTest.kt | 56 assertEquals(TEST1, parsedConfig[CodeUtils.hash(PATH, 58 assertEquals(TEST2, parsedConfig[CodeUtils.hash(PATH, TEST2.messageString, 60 assertEquals(TEST3, parsedConfig[CodeUtils.hash(PATH, TEST3.messageString, 73 assertEquals(TEST1, parsedConfig[CodeUtils.hash(PATH, TEST1.messageString, 87 assertEquals(TEST1, parsedConfig[CodeUtils.hash( 89 assertEquals(TEST3, parsedConfig[CodeUtils.hash(
|
/aosp14/frameworks/base/services/core/java/com/android/server/notification/ |
H A D | SmallHash.java | 32 public static int hash(String in) { in hash() method in SmallHash 33 return hash(Objects.hashCode(in)); in hash() 41 public static int hash(int in) { in hash() method in SmallHash
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/media/controls/util/ |
H A D | SmallHash.java | 29 public static int hash(String in) { in hash() method in SmallHash 30 return hash(Objects.hashCode(in)); in hash() 39 public static int hash(int in) { in hash() method in SmallHash
|
/aosp14/frameworks/base/services/core/java/com/android/server/am/ |
H A D | ActivityManagerUtils.java | 83 final int hash = getUnsignedHashUnCached(s); in getUnsignedHashCached() local 84 sHashCache.put(s.intern(), hash); in getUnsignedHashCached() local 85 return hash; in getUnsignedHashCached() 126 final int hash = getUnsignedHashCached(packageName) ^ getAndroidIdHash(); in shouldSamplePackageForAtom() local 128 return (((double) hash) / Integer.MAX_VALUE) <= rate; in shouldSamplePackageForAtom()
|
/aosp14/frameworks/base/core/java/android/util/ |
H A D | ArraySet.java | 97 private int binarySearch(int[] hashes, int hash) { in binarySearch() argument 107 private int indexOf(Object key, int hash) { in indexOf() argument 115 int index = binarySearch(mHashes, hash); in indexOf() 458 final int hash; in add() local 461 hash = 0; in add() 465 index = indexOf(value, hash); in add() 507 mHashes[index] = hash; in add() 521 final int hash = value == null ? 0 in append() local 526 if (index > 0 && mHashes[index - 1] > hash) { in append() 531 Log.w(TAG, "New hash " + hash in append() [all …]
|
H A D | ArrayMap.java | 141 int indexOf(Object key, int hash) { in indexOf() argument 579 final int hash; in put() local 582 hash = 0; in put() 586 index = indexOf(key, hash); in put() 631 mHashes[index] = hash; in put() 646 final int hash = key == null ? 0 in append() local 654 Log.w(TAG, "New hash " + hash in append() 661 mHashes[index] = hash; in append() 684 int hash = mHashes[i]; in validate() local 685 if (hash != basehash) { in validate() [all …]
|
/aosp14/frameworks/base/core/java/android/util/jar/ |
H A D | StrictJarVerifier.java | 111 private final byte[] hash; field in StrictJarVerifier.VerifierEntry 117 VerifierEntry(String name, MessageDigest digest, byte[] hash, in VerifierEntry() argument 121 this.hash = hash; in VerifierEntry() 155 if (!verifyMessageDigest(d, hash)) { in verify() 247 final String hash = attributes.getValue(algorithm + "-Digest"); in initEntry() local 248 if (hash == null) { in initEntry() 251 byte[] hashBytes = hash.getBytes(StandardCharsets.ISO_8859_1); in initEntry() 506 String hash = attributes.getValue(algorithm + entry); in verify() local 507 if (hash == null) { in verify() 523 byte[] encodedHashBytes = hash.getBytes(StandardCharsets.ISO_8859_1); in verify()
|