Home
last modified time | relevance | path

Searched refs:hash (Results 1 - 25 of 403) sorted by relevance

12345678910>>...17

/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/common/src/
H A Dhash.cpp16 #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...]
/test/xts/tools/lite/checksum/src/
H A Dchecksum_sha256.c135 md->hash[i] = hashInit[i]; in InitSha256()
147 unsigned int word[wordLen], hash[len]; in CalcSha256() local
169 hash[i] = md->hash[i]; in CalcSha256()
173 hashT1 = hash[H] + CalcEp1Value(hash[E]) + CalcChValue(hash[E], hash[F], hash[G]) + G_DEFAULT_KEY[i] + word[i]; in CalcSha256()
174 hashT2 = CalcEp0Value(hash[ in CalcSha256()
[all...]
/foundation/graphic/graphic_3d/lume/LumeBase/api/base/util/
H A Dhash.h31 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 Dcompile_time_hashes.h45 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 Dpost_proc_slr.h46 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...]
/base/hiviewdfx/hiview/utility/common_utils/
H A Dcalc_fingerprint.cpp26 int CalcFingerprint::ConvertToString(const unsigned char hash[SHA256_DIGEST_LENGTH], char *outstr, size_t len) in ConvertToString() argument
31 if (hash == nullptr || outHash == nullptr) { in ConvertToString()
39 int err = snprintf_s(outHash, charsEachHex + 1, charsEachHex, "%02x", hash[i]); in ConvertToString()
51 * Description : calculate a file sha1 hash for given file
54 * hash : buffer to store output sha1 string
59 int CalcFingerprint::CalcFileSha(const string& filePath, char *hash, size_t len) in CalcFileSha() argument
61 if (filePath.empty() || hash == nullptr || !FileUtil::IsLegalPath(filePath)) { in CalcFileSha()
71 return ConvertToString(value, hash, len); in CalcFileSha()
74 int CalcFingerprint::CalcFileShaOriginal(const string& filePath, unsigned char *hash, size_t len) in CalcFileShaOriginal() argument
76 if (filePath.empty() || hash in CalcFileShaOriginal()
118 CalcBufferSha(const string& buffer, size_t bufSize, char *hash, size_t len) CalcBufferSha() argument
138 CalcBufferSha(unsigned char* source, size_t sourceLen, char *hash, size_t hashLen) CalcBufferSha() argument
[all...]
/foundation/communication/dsoftbus/components/nstackx/fillp/src/fillp_lib/src/
H A Dsha256.c100 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...]
/foundation/arkui/ace_engine_lite/frameworks/src/core/modules/presets/
H A Dcjson_parser.h199 * @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 Dlnn_map.c37 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...]
/base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite/
H A Dhiview_log.h408 * Interface for printing hash logs.
412 * @param hash Hash of printing string.
413 * @attention Never use this interface directly, only for hash tools.
415 void HILOG_HashPrintf(uint8 module, uint8 level, const char *nums, uint32 hash, ...);
418 * Interface for printing debug hash logs.
422 * @param hash Hash of printing string.
423 * @attention Never use this interface directly, only for hash tools.
426 #define HILOG_DEBUG_HASH(mod, hash, ...) \
427 HILOG_HashPrintf(mod, HILOG_LV_DEBUG, FUN_ARG_NUM(__VA_ARGS__), hash, ##__VA_ARGS__)
429 #define HILOG_DEBUG_HASH(mod, hash,
[all...]
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework/utils/
H A Dcrypto.cpp38 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()
/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/src/
H A Dhks_openssl_hash.c66 static int32_t HashCheckParam(uint32_t alg, const struct HksBlob *msg, struct HksBlob *hash) in HashCheckParam() argument
70 HKS_IF_NOT_SUCC_LOGE_RETURN(HksOpensslCheckBlob(hash), HKS_ERROR_INVALID_ARGUMENT, "Invalid param hash!") in HashCheckParam()
76 int32_t HksOpensslHash(uint32_t alg, const struct HksBlob *msg, struct HksBlob *hash) in HksOpensslHash() argument
78 int32_t ret = HashCheckParam(alg, msg, hash); in HksOpensslHash()
84 ret = EVP_Digest(msg->data, msg->size, hash->data, &hash->size, opensslAlg, NULL); in HksOpensslHash()
134 int32_t HksOpensslHashFinal(void **cryptoCtx, const struct HksBlob *msg, struct HksBlob *hash) in HksOpensslHashFinal() argument
147 if (HksOpensslCheckBlob(hash) != HKS_SUCCESS) { in HksOpensslHashFinal()
148 HKS_LOG_E("Invalid param hash!"); in HksOpensslHashFinal()
[all...]
/base/hiviewdfx/hiview/utility/common_utils/include/
H A Dcalc_fingerprint.h31 * CalcFileSha: calculate a file sha1 hash for given file
34 * The caller can pass a char hash_str[41] to get the hash string
37 static int CalcFileSha(const std::string& filePath, char *hash, size_t len);
40 * CalcFileSha: calculate a file sha1 hash for given file
43 * The caller can pass a char hash[41] to get the hash
46 static int CalcFileShaOriginal(const std::string& filePath, unsigned char *hash, size_t len);
49 * CalcBufferSha: calculate a buffer sha1 hash for given buffer
52 * The caller can pass a char hash_str[41] to get the hash string
55 static int CalcBufferSha(const std::string& buffer, size_t bufSize, char *hash, size_
[all...]
/foundation/ability/form_fwk/services/include/
H A Dform_id_key.h61 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 Dcast_service_common.h73 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 ()()
/base/update/updater/services/package/pkg_verify/
H A Dpkg_verify_util.cpp80 std::vector<uint8_t> hash; in VerifySign() local
81 int32_t ret = Pkcs7verify(signData, hash); in VerifySign()
87 size_t hashLen = hash.size(); in VerifySign()
88 if ((hashLen != digest.size()) || memcmp(hash.data(), digest.data(), hashLen) != EOK) { in VerifySign()
111 std::vector<uint8_t> hash; in VerifyPackageSign() local
112 int32_t ret = Pkcs7verify(signature, hash); in VerifyPackageSign()
120 ret = HashCheck(pkgStream, srcDataLen, hash); in VerifyPackageSign()
123 ret = HashCheck(pkgStream, srcDataLen, hash); in VerifyPackageSign()
179 int32_t PkgVerifyUtil::Pkcs7verify(std::vector<uint8_t> &signature, std::vector<uint8_t> &hash) const in Pkcs7verify()
183 return pkcs7.GetHashFromSignBlock(signature.data(), signature.size(), hash); in Pkcs7verify()
[all...]
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/test/
H A Dobject_asset_machine_test.cpp55 .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...]
/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/src/
H A Dhks_mbedtls_hash.c97 static int32_t HksMbedtlsHashMd5Final(struct HksMbedtlsHashCtx *ctx, const struct HksBlob *msg, struct HksBlob *hash) in HksMbedtlsHashMd5Final() argument
114 ret = mbedtls_md5_finish_ret(context, hash->data); in HksMbedtlsHashMd5Final()
184 static int32_t HksMbedtlsHashSha1Final(struct HksMbedtlsHashCtx *ctx, const struct HksBlob *msg, struct HksBlob *hash) in HksMbedtlsHashSha1Final() argument
191 if (hash->data == NULL) { in HksMbedtlsHashSha1Final()
206 ret = mbedtls_sha1_finish_ret(context, hash->data); in HksMbedtlsHashSha1Final()
281 struct HksBlob *hash) in HksMbedtlsHashSha256Final()
288 if (hash->data == NULL) { in HksMbedtlsHashSha256Final()
303 ret = mbedtls_sha256_finish_ret(context, hash->data); in HksMbedtlsHashSha256Final()
380 struct HksBlob *hash) in HksMbedtlsHashSha512Final()
387 if (hash in HksMbedtlsHashSha512Final()
280 HksMbedtlsHashSha256Final(struct HksMbedtlsHashCtx *ctx, const struct HksBlob *msg, struct HksBlob *hash) HksMbedtlsHashSha256Final() argument
379 HksMbedtlsHashSha512Final(struct HksMbedtlsHashCtx *ctx, const struct HksBlob *msg, struct HksBlob *hash) HksMbedtlsHashSha512Final() argument
526 HksMbedtlsHashFinal(void **cryptoCtx, const struct HksBlob *msg, struct HksBlob *hash) HksMbedtlsHashFinal() argument
603 HksMbedtlsHash(uint32_t alg, const struct HksBlob *msg, struct HksBlob *hash) HksMbedtlsHash() argument
[all...]
/foundation/graphic/graphic_3d/lume/metaobject/include/meta/base/
H A Dmeta_types.h41 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 Dwhite_list_util.cpp239 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 Drs_mesa_blur_shader_filter.cpp63 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...]
/foundation/distributedhardware/device_manager/utils/src/crypto/
H A Ddm_crypto.cpp98 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 Dbase.cpp73 // 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 Dgpu_memory_allocator_vk.cpp76 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 Drs_drawing_filter_test.cpp54 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...]

Completed in 11 milliseconds

12345678910>>...17