/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/common/src/ |
H A D | hash.cpp | 16 #include "hash.h" 21 uint64_t hash = 0; in HashFunc() local 25 hash = (hash * PRIME_SEED) + input.at(idx); in HashFunc() 28 return hash; in HashFunc() 33 uint32_t hash = 0; in Hash32Func() local 37 hash = (hash << 4) + input.at(idx); // left shift the lowest 4 bits for 4 bits. in Hash32Func() 38 uint32_t x = (hash & 0xf0000000); in Hash32Func() 40 hash in Hash32Func() [all...] |
/foundation/graphic/graphic_3d/lume/LumeBase/api/base/util/ |
H A D | hash.h | 31 uint64_t hash(const T& value); 34 inline uint64_t hash(const uint8_t& value) in hash() function 39 inline uint64_t hash(const uint16_t& value) in hash() function 44 inline uint64_t hash(const uint32_t& value) in hash() function 49 inline uint64_t hash(const uint64_t& value) in hash() function 55 inline uint64_t hash(const unsigned long& value) in hash() function 61 inline uint64_t hash(const int8_t& value) in hash() function 66 inline uint64_t hash(const int16_t& value) in hash() function 71 inline uint64_t hash(const int32_t& value) in hash() function 76 inline uint64_t hash(cons function 81 inline uint64_t hash(void* const& value) hash() function 86 inline uint64_t hash(T* const& value) hash() function 94 uint32_t hash = FNV_OFFSET_BASIS_32; FNV1a32Hash() local 118 uint64_t hash = FNV_OFFSET_BASIS; FNV1aHash() local [all...] |
H A D | compile_time_hashes.h | 45 inline constexpr uint64_t FNV1aHash(const char* const first, uint64_t hash = FNV_OFFSET_BASIS) in FNV1aHash() 48 return hash; in FNV1aHash() 50 hash ^= (uint64_t)*first; in FNV1aHash() 52 hash = mulu64(hash, FNV_PRIME); in FNV1aHash() 53 return FNV1aHash(first + 1, hash); in FNV1aHash()
|
/foundation/multimedia/image_framework/frameworks/innerkitsimpl/converter/include/ |
H A D | post_proc_slr.h | 46 uint32_t hash = 0; in HashKey() local 47 hash = mix(hash, SkGoodHash()(relax(src_.width))); in HashKey() 48 hash = mix(hash, SkGoodHash()(relax(src_.height))); in HashKey() 49 hash = mix(hash, SkGoodHash()(relax(dst_.width))); in HashKey() 50 hash = mix(hash, SkGoodHash()(relax(dst_.height))); in HashKey() 51 return hash; in HashKey() 54 mix(uint32_t hash, uint32_t data) mix() argument [all...] |
/foundation/communication/dsoftbus/components/nstackx/fillp/src/fillp_lib/src/ |
H A D | sha256.c | 100 sCompile 64 bytes of hash data into SHA256 digest value 117 FILLP_UINT32 hash[FILLP_HASH_ARRAY_SZ]; in FillpSha256Compile() local 119 FillpErrorType err = memcpy_s(hash, sizeof(hash), ctx->hash, sizeof(ctx->hash)); in FillpSha256Compile() 121 FILLP_LOGERR("FillpSha256Compile memcpy_s hash failed : %d", err); in FillpSha256Compile() 138 hash[key0] += buf[key3]; in FillpSha256Compile() 141 hash[key0] += g_k256[key1]; in FillpSha256Compile() 144 hash[key in FillpSha256Compile() [all...] |
/device/soc/rockchip/common/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd_wifi6/ |
H A D | bcmbloom.c | 55 bcm_bloom_hash_t *hash; /* array of hash functions */ member 83 bp->hash = (*alloc_cb)(cb_ctx, sizeof(*bp->hash) * max_hash); in bcm_bloom_create() 84 memset(bp->hash, 0, sizeof(*bp->hash) * max_hash); in bcm_bloom_create() 86 if (!bp->hash) { in bcm_bloom_create() 124 if (bp->hash) in bcm_bloom_destroy() 125 (*free_cb)(bp->cb_ctx, bp->hash, in bcm_bloom_destroy() 126 sizeof(*bp->hash) * b in bcm_bloom_destroy() 134 bcm_bloom_add_hash(bcm_bloom_filter_t *bp, bcm_bloom_hash_t hash, uint *idx) bcm_bloom_add_hash() argument [all...] |
/foundation/arkui/ace_engine_lite/frameworks/src/core/modules/presets/ |
H A D | cjson_parser.h | 199 * @brief get the string hash value.the hash algorithm is NFV-1a hash 201 * @param key the string need to hash 202 * @return the hash result which is the index array number 206 uint64_t hash = 2166136261; in FNVHash() local 210 hash = (hash ^ keyVal) * NFV_PRIME; in FNVHash() 212 hash += hash << PRIME_OFFSET_ in FNVHash() [all...] |
/foundation/communication/dsoftbus/core/bus_center/utils/src/ |
H A D | lnn_map.c | 37 uint32_t hash = 0; in MapHash() local 44 hash = (hash * seed) + (*key++); in MapHash() 47 return (hash & 0x7FFFFFFF); in MapHash() 50 static int32_t MapHashIdx(const Map *map, uint32_t hash) in MapHashIdx() argument 55 return (int32_t)(hash & (map->bucketSize - 1)); in MapHashIdx() 60 int32_t idx = MapHashIdx(map, node->hash); in MapAddNode() 62 LNN_LOGE(LNN_STATE, "invalid param, get map hash idx failed"); in MapAddNode() 104 static MapNode *MapCreateNode(const char *key, uint32_t hash, in MapCreateNode() argument 115 node->hash in MapCreateNode() 152 uint32_t hash = MapHash(key); LnnMapSet() local 214 uint32_t hash = MapHash(key); LnnMapGet() local 246 uint32_t hash = MapHash(key); LnnMapErase() local [all...] |
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework/utils/ |
H A D | crypto.cpp | 38 unsigned char hash[SHA256_DIGEST_LENGTH * 2 + 1] = ""; in Sha256() local 42 SHA256_Final(&hash[SHA256_DIGEST_LENGTH], &ctx); in Sha256() 43 // here we translate sha256 hash to hexadecimal. each 8-bit char will be presented by two characters([0-9a-f]) in Sha256() 48 unsigned char value = hash[SHA256_DIGEST_LENGTH + i]; in Sha256() 50 hash[i * 2] = hexCode[(value >> WIDTH) & MASK]; in Sha256() 52 hash[i * 2 + 1] = hexCode[value & MASK]; in Sha256() 55 hash[SHA256_DIGEST_LENGTH * 2] = 0; in Sha256() 56 return reinterpret_cast<char *>(hash); in Sha256()
|
/device/soc/hisilicon/hi3516dv300/sdk_linux/drv/interdrv/common/cipher/src/drv/cipher_v1.0/drivers/crypto/ |
H A D | cryp_hash.c | 25 /* size of hash physical memory 1M */ 39 /* first byte of hash padding */ 50 /* SHA-1, the initial hash value, H(0) */ 57 /* SHA-224, the initial hash value, H(0) */ 67 /* SHA-256, the initial hash value, H(0) */ 77 /* SHA-384, the initial hash value, H(0) */ 87 /* SHA-512, the initial hash value, H(0) */ 97 /* SM3, the initial hash value, H(0) */ 107 /* hash function list */ 113 * \brief hash contex 123 hi_u32 hash[HASH_RESULT_MAX_SIZE_IN_WORD]; /* buffer to store the result */ global() member 592 cryp_hash_finish(hi_void *ctx, hi_void *hash, hi_u32 hash_buf_len, hi_u32 *hashlen) cryp_hash_finish() argument [all...] |
/foundation/ability/form_fwk/services/include/ |
H A D | form_id_key.h | 61 return std::hash<std::string>()(bundleName) in hashCode() 62 + std::hash<std::string>()(moduleName) in hashCode() 63 + std::hash<std::string>()(abilityName) in hashCode() 64 + std::hash<std::string>()(formName) in hashCode() 65 + std::hash<int>()(specificationId) in hashCode() 66 + std::hash<int>()(orientation); in hashCode()
|
/foundation/CastEngine/castengine_cast_framework/common/include/private/ |
H A D | cast_service_common.h | 73 struct hash<CastInnerRemoteDevice> { struct 76 return std::hash<std::string>()(remoteDevice.deviceId) in operator ()() 77 ^ std::hash<std::string>()(remoteDevice.deviceName) in operator ()() 78 ^ std::hash<std::string>()(remoteDevice.bleMac) in operator ()() 79 ^ std::hash<std::string>()(remoteDevice.wifiIp) in operator ()() 80 ^ std::hash<uint16_t>()(remoteDevice.wifiPort) in operator ()() 81 ^ std::hash<std::string>()(remoteDevice.customData); in operator ()()
|
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/test/ |
H A D | object_asset_machine_test.cpp | 55 .hash = "modifyTime_size", in SetUp() 101 .hash = "modifyTime2_size2", in HWTEST_F() 108 ASSERT_EQ(changedAssets_[uri_].asset.hash, asset.hash); in HWTEST_F() 125 .hash = "modifyTime2_size2", in HWTEST_F() 147 .hash = "modifyTime1_size1", in HWTEST_F() 154 ASSERT_EQ(changedAssets_[uri_].asset.hash, asset.hash); in HWTEST_F() 171 .hash = "modifyTime1_size1", in HWTEST_F() 197 .hash in HWTEST_F() [all...] |
/foundation/graphic/graphic_3d/lume/metaobject/include/meta/base/ |
H A D | meta_types.h | 41 inline constexpr BASE_NS::Uid MakeUidImpl(uint64_t hash, const char (&type)[9]) in MakeUidImpl() argument 43 uint8_t data[16u] { static_cast<uint8_t>((hash >> 56) & 0xFF), static_cast<uint8_t>((hash >> 48) & 0xFF), in MakeUidImpl() 44 static_cast<uint8_t>((hash >> 40) & 0xFF), static_cast<uint8_t>((hash >> 32) & 0xFF), in MakeUidImpl() 45 static_cast<uint8_t>((hash >> 24) & 0xFF), static_cast<uint8_t>((hash >> 16) & 0xFF), in MakeUidImpl() 46 static_cast<uint8_t>((hash >> 8) & 0xFF), static_cast<uint8_t>(hash & 0xFF), static_cast<uint8_t>(type[0]), in MakeUidImpl() 81 inline constexpr uint64_t CombineHash(uint64_t hash) in CombineHash() argument [all...] |
/foundation/distributedhardware/distributed_input/common/include/ |
H A D | white_list_util.cpp | 239 WhiteListItemHash hash; in GetCombKeysHash() local 240 GetAllComb(combKeys, hash, combKeys.size(), hashSets); in GetCombKeysHash() 247 void WhiteListUtil::GetAllComb(TYPE_COMBINATION_KEY_VEC vecs, WhiteListItemHash hash, in GetAllComb() argument 253 std::string hashStr = hash.hash + std::to_string(code); in GetAllComb() 254 WhiteListItemHash newHash(hashStr, hash.len + 1); in GetAllComb() 261 if (hash.len == targetLen) { in GetAllComb() 262 hashSets.insert(hash.hash); in GetAllComb() 300 std::string hash in GetBusinessEventHash() local 326 std::string hash = GetBusinessEventHash(event); IsNeedFilterOut() local [all...] |
/foundation/graphic/graphic_2d/rosen/modules/render_service_base/src/render/ |
H A D | rs_mesa_blur_shader_filter.cpp | 63 hash_ = SkOpts::hash(&radius_, sizeof(radius_), 0); in CalculateHash() 64 hash_ = SkOpts::hash(&greyCoefLow_, sizeof(greyCoefLow_), hash_); in CalculateHash() 65 hash_ = SkOpts::hash(&greyCoefHigh_, sizeof(greyCoefHigh_), hash_); in CalculateHash() 67 hash_ = SkOpts::hash(&localParams->offsetX_, sizeof(localParams->offsetX_), hash_); in CalculateHash() 68 hash_ = SkOpts::hash(&localParams->offsetY_, sizeof(localParams->offsetY_), hash_); in CalculateHash() 69 hash_ = SkOpts::hash(&localParams->offsetZ_, sizeof(localParams->offsetZ_), hash_); in CalculateHash() 70 hash_ = SkOpts::hash(&localParams->offsetW_, sizeof(localParams->offsetW_), hash_); in CalculateHash() 71 hash_ = SkOpts::hash(&localParams->tileMode_, sizeof(localParams->tileMode_), hash_); in CalculateHash() 72 hash_ = SkOpts::hash(&localParams->width_, sizeof(localParams->width_), hash_); in CalculateHash() 73 hash_ = SkOpts::hash( in CalculateHash() [all...] |
H A D | rs_water_ripple_shader_filter.cpp | 37 hash_ = SkOpts::hash(&progress_, sizeof(progress_), hash_); in RSWaterRippleShaderFilter() 38 hash_ = SkOpts::hash(&waveCount_, sizeof(waveCount_), hash_); in RSWaterRippleShaderFilter() 39 hash_ = SkOpts::hash(&rippleCenterX_, sizeof(rippleCenterX_), hash_); in RSWaterRippleShaderFilter() 40 hash_ = SkOpts::hash(&rippleCenterY_, sizeof(rippleCenterY_), hash_); in RSWaterRippleShaderFilter() 41 hash_ = SkOpts::hash(&rippleMode_, sizeof(rippleMode_), hash_); in RSWaterRippleShaderFilter()
|
H A D | rs_drawing_filter.cpp | 51 RSDrawingFilter::RSDrawingFilter(std::shared_ptr<Drawing::ImageFilter> imageFilter, uint32_t hash) in RSDrawingFilter() argument 54 imageFilterHash_ = hash; in RSDrawingFilter() 67 std::shared_ptr<RSShaderFilter> shaderFilter, uint32_t hash) : RSFilter(), imageFilter_(imageFilter) in RSDrawingFilter() 70 imageFilterHash_ = hash; in RSDrawingFilter() 76 std::vector<std::shared_ptr<RSShaderFilter>> shaderFilters, uint32_t hash) in RSDrawingFilter() 81 uint32_t hash = shaderFilter->Hash(); in RSDrawingFilter() local 82 hash_ = SkOpts::hash(&hash, sizeof(hash), hash_); in RSDrawingFilter() 84 imageFilterHash_ = hash; in RSDrawingFilter() 66 RSDrawingFilter(std::shared_ptr<Drawing::ImageFilter> imageFilter, std::shared_ptr<RSShaderFilter> shaderFilter, uint32_t hash) RSDrawingFilter() argument 75 RSDrawingFilter(std::shared_ptr<Drawing::ImageFilter> imageFilter, std::vector<std::shared_ptr<RSShaderFilter>> shaderFilters, uint32_t hash) RSDrawingFilter() argument 194 auto hash = SkOpts::hash(&imageFilterHash_, sizeof(imageFilterHash_), hash_); Hash() local [all...] |
/foundation/distributedhardware/device_manager/utils/src/crypto/ |
H A D | dm_crypto.cpp | 98 unsigned char hash[SHA256_DIGEST_LENGTH * HEX_TO_UINT8 + 1] = ""; in Sha256() local 99 DmGenerateStrHash(data, size, hash, HexifyLen(SHA256_DIGEST_LENGTH), SHA256_DIGEST_LENGTH); in Sha256() 100 // here we translate sha256 hash to hexadecimal. each 8-bit char will be presented by two characters([0-9a-f]) in Sha256() 103 unsigned char value = hash[SHA256_DIGEST_LENGTH + i]; in Sha256() 105 hash[i * HEX_TO_UINT8] = hexCode[(value >> WIDTH) & MASK]; in Sha256() 106 hash[i * HEX_TO_UINT8 + 1] = hexCode[value & MASK]; in Sha256() 108 hash[SHA256_DIGEST_LENGTH * HEX_TO_UINT8] = 0; in Sha256() 110 ss << hash; in Sha256() local 116 unsigned char hash[SHA256_DIGEST_LENGTH] = ""; in GetUdidHash() local 117 DmGenerateStrHash(udid.data(), udid.size(), hash, SHA256_DIGEST_LENGT in GetUdidHash() 168 unsigned char hash[SHA256_DIGEST_LENGTH] = ""; GetGroupIdHash() local 215 unsigned char hash[SHA256_DIGEST_LENGTH] = ""; GetAccountIdHash() local [all...] |
/foundation/resourceschedule/ffrt/benchmarks/base/ |
H A D | base.cpp | 73 // calculate FNV hash of the array in BenchmarkNative() 74 uint64_t hash = 14695981039346656037ULL; in BenchmarkNative() local 76 hash = (hash * 1099511628211ULL) ^ arr[i]; in BenchmarkNative() 79 return hash; in BenchmarkNative() 104 // calculate FNV hash of the array in BenchmarkFFRT() 105 uint64_t hash = 14695981039346656037ULL; in BenchmarkFFRT() local 107 hash = (hash * 1099511628211ULL) ^ arr[i]; in BenchmarkFFRT() 110 return hash; in BenchmarkFFRT() [all...] |
/foundation/graphic/graphic_3d/lume/LumeRender/src/vulkan/ |
H A D | gpu_memory_allocator_vk.cpp | 76 uint64_t BASE_NS::hash(const RENDER_NS::GpuBufferDesc& desc) in hash() function in BASE_NS 90 uint64_t BASE_NS::hash(const RENDER_NS::GpuImageDesc& desc) in hash() function in BASE_NS 368 const uint64_t hash = BASE_NS::hash(desc); in GetBufferPool() local 369 if (const auto iter = hashToGpuBufferPoolIndex_.find(hash); iter != hashToGpuBufferPoolIndex_.cend()) { in GetBufferPool() 379 const uint64_t hash = BASE_NS::hash(desc); in GetImagePool() local 380 if (const auto iter = hashToGpuImagePoolIndex_.find(hash); iter != hashToGpuImagePoolIndex_.cend()) { in GetImagePool() 432 const uint64_t hash = BASE_NS::hash(bu in CreatePoolForBuffers() local 483 const uint64_t hash = BASE_NS::hash(img); CreatePoolForImages() local 504 const size_t hash = BASE_NS::hash(desc); GetBufferPoolDebugName() local 513 const size_t hash = BASE_NS::hash(desc); GetImagePoolDebugName() local [all...] |
/foundation/graphic/graphic_2d/rosen/test/render_service/render_service_base/unittest/render/ |
H A D | rs_drawing_filter_test.cpp | 54 uint32_t hash = 1; in HWTEST_F() local 55 RSDrawingFilter drawingFilter(imageFilter, shaderFilters, hash); in HWTEST_F() 74 uint32_t hash = 1; in HWTEST_F() local 75 RSDrawingFilter drawingFilter(imageFilter, shaderFilters, hash); in HWTEST_F() 101 uint32_t hash = 1; in HWTEST_F() local 102 RSDrawingFilter drawingFilter(imageFilter, shaderFilters, hash); in HWTEST_F() 122 RSDrawingFilter drawingFilter2(imageFilter, shaderFilters2, hash); in HWTEST_F() 140 uint32_t hash = 1; in HWTEST_F() local 141 RSDrawingFilter drawingFilter(imageFilter, shaderFilters, hash); in HWTEST_F() 146 other = std::make_shared<RSDrawingFilter>(imageFilter, shaderFilters, hash); in HWTEST_F() 163 uint32_t hash = 1; HWTEST_F() local 186 uint32_t hash = 1; HWTEST_F() local 209 uint32_t hash = 1; HWTEST_F() local 232 uint32_t hash = 1; HWTEST_F() local 265 uint32_t hash = 1; HWTEST_F() local [all...] |
/foundation/distributeddatamgr/relational_store/interfaces/inner_api/rdb/include/ |
H A D | asset_value.h | 41 std::string hash; member 67 if (hash != ref.hash) { in operator <() 68 return hash < ref.hash; in operator <()
|
/device/qemu/riscv32_virt/liteos_m/board/driver/video/ |
H A D | key_cache.c | 72 PRINTK(" keyCache dump hash %d item %s %p %d\n", i,
in KeyCacheDump() 98 uint32_t hash;
in NameHash() local 99 hash = LOS_HashFNV32aBuf(name, len, FNV1_32A_INIT);
in NameHash() 100 return hash;
in NameHash() 105 int hash = NameHash(name, len) & PATH_CACHE_HASH_MASK;
in KeyCacheInsert() local 106 LOS_ListAdd(&g_keyCacheHashEntrys[hash], &cache->hashEntry);
in KeyCacheInsert() 152 int hash = NameHash(name, len) & PATH_CACHE_HASH_MASK;
in KeyCacheLookup() local 153 LIST_HEAD *dhead = &g_keyCacheHashEntrys[hash];
in KeyCacheLookup()
|
/device/soc/hisilicon/hi3861v100/sdk_liteos/platform/system/upg/ |
H A D | upg_check_boot_bin.c | 23 hi_u8 hash[SHA_256_LENGTH]; in upg_check_boot_root_pub_key() local 34 (hi_void) memset_s(hash, SHA_256_LENGTH, 0, SHA_256_LENGTH); in upg_check_boot_root_pub_key() 35 hi_u32 ret = hi_cipher_hash_sha256((uintptr_t)pubk, pubk_len, hash, sizeof(hash)); in upg_check_boot_root_pub_key() 46 if (memcmp(hash, efuse_hash, SHA_256_LENGTH) != EOK) { in upg_check_boot_root_pub_key() 131 hi_u8 hash[SHA_256_LENGTH] = { 0 }; in upg_check_boot_sub_key() local 141 ret = hi_cipher_hash_sha256((uintptr_t)sub_key, sizeof(sub_ecc_key) - ECC_64_BYTES, hash, sizeof(hash)); in upg_check_boot_sub_key() 143 upg_print("[upg check bootbin]hash ecc key hash er in upg_check_boot_sub_key() 243 hi_u8 hash[SHA_256_LENGTH] = { 0 }; upg_check_boot_from_mem() local 314 hi_u8 hash[SHA_256_LENGTH] = { 0 }; upg_check_unencrpt_boot_code() local [all...] |