Home
last modified time | relevance | path

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

12345

/Zephyr-latest/lib/hash/
Dhash_func32_djb2.c37 uint32_t hash; in sys_hash32_djb2() local
41 for (hash = 5381, d = str; n > 0; --n, ++d) { in sys_hash32_djb2()
43 hash = (hash << 5) + hash; in sys_hash32_djb2()
44 hash ^= *d; in sys_hash32_djb2()
47 return hash; in sys_hash32_djb2()
DKconfig.hash_func10 Enable this option to support hash functions.
15 bool "Daniel J. Bernstein's hash function (djb2)"
18 bool "Murmur3 hash function"
21 prompt "Default system-wide 32-bit hash function"
24 The default system-wide 32-bit hash function is sys_hash32().
27 bool "Default 32-bit hash is djb2"
31 bool "Default 32-bit hash is Murmur3"
35 bool "Default 32-bit hash is the identity"
37 This is the naive identity hash function. It only works for strings
DKconfig.hash_map55 bool "Default hash is Separate-Chaining"
59 bool "Default hash is Open-Addressing / Linear Probe"
63 bool "Default hash is C++"
Dhash_map_sc.c36 uint32_t hash = map->hash_func(&entry->key, sizeof(entry->key)); in sys_hashmap_sc_insert_entry() local
38 sys_dlist_append(&buckets[hash % map->data->n_buckets], &entry->node); in sys_hashmap_sc_insert_entry()
111 uint32_t hash; in sys_hashmap_sc_find() local
122 hash = map->hash_func(&key, sizeof(key)); in sys_hashmap_sc_find()
124 bucket = &buckets[hash % map->data->n_buckets]; in sys_hashmap_sc_find()
/Zephyr-latest/scripts/pylib/pytest-twister-harness/src/twister_harness/helpers/
Dmcumgr.py26 hash: str = '' variable in MCUmgrImage
88 image_list[-1].hash = m.group(1)
95 return image.hash
103 return image.hash
107 def image_test(self, hash: str | None = None):
108 if not hash:
109 hash = self.get_hash_to_test()
112 def image_confirm(self, hash: str | None = None):
113 if not hash:
114 hash = self.get_hash_to_confirm()
/Zephyr-latest/subsys/jwt/
Djwt_legacy_rsa.c42 uint8_t hash[32]; in jwt_sign_impl() local
48 res = mbedtls_sha256(builder->base, builder->buf - builder->base, hash, 0); in jwt_sign_impl()
53 res = mbedtls_pk_sign(&ctx, MBEDTLS_MD_SHA256, hash, sizeof(hash), sig, sig_size, in jwt_sign_impl()
/Zephyr-latest/tests/crypto/tinycrypt/src/
Decc_dsa.c80 int sign_vectors(TCSha256State_t hash, char **d_vec, char **k_vec, in sign_vectors() argument
119 tc_sha256_init(hash); in sign_vectors()
120 tc_sha256_update(hash, msg, msglen); in sign_vectors()
121 tc_sha256_final(digest_bytes, hash); in sign_vectors()
342 int vrfy_vectors(TCSha256State_t hash, char **msg_vec, char **qx_vec, char **qy_vec, in vrfy_vectors() argument
376 tc_sha256_init(hash); in vrfy_vectors()
377 tc_sha256_update(hash, msg, msglen); in vrfy_vectors()
378 tc_sha256_final(digest_bytes, hash); in vrfy_vectors()
580 uint8_t hash[NUM_ECC_BYTES]; in montecarlo_signverify() local
592 uECC_vli_nativeToBytes(hash, NUM_ECC_BYTES, hash_words); in montecarlo_signverify()
[all …]
/Zephyr-latest/subsys/storage/flash_map/
Dflash_map_integrity.c34 unsigned char hash[SHA256_DIGEST_SIZE]; in flash_area_check_int_sha256() local
91 rc = psa_hash_finish(&hash_ctx, hash, sizeof(hash), &hash_len); in flash_area_check_int_sha256()
93 rc = mbedtls_sha256_finish(&hash_ctx, hash); in flash_area_check_int_sha256()
100 if (memcmp(hash, fac->match, SHA256_DIGEST_SIZE)) { in flash_area_check_int_sha256()
/Zephyr-latest/subsys/mgmt/updatehub/
Dupdatehub_integrity.c77 uint8_t *hash, const uint32_t size) in updatehub_integrity_finish() argument
81 if (ctx == NULL || hash == NULL) { in updatehub_integrity_finish()
93 ret = psa_hash_finish(ctx, hash, size, &hash_len); in updatehub_integrity_finish()
98 ret = mbedtls_sha256_finish(ctx, hash); in updatehub_integrity_finish()
Dupdatehub_storage.c58 const uint8_t *hash, const size_t size) in updatehub_storage_check() argument
60 if (ctx == NULL || hash == NULL || size == 0) { in updatehub_storage_check()
64 const struct flash_img_check fic = { .match = hash, .clen = size }; in updatehub_storage_check()
/Zephyr-latest/scripts/pylib/pytest-twister-harness/tests/fixtures/
Dmcumgr_fixture_test.py33 mcumgr.image_test(hash='ABCD')
36 mcumgr.image_confirm(hash='ABCD')
76 assert image_list[0].hash == '0000'
81 assert image_list[1].hash == '1111'
/Zephyr-latest/tests/subsys/mgmt/mcumgr/mcumgr_client/src/
Dimg_gr_stub.c127 zcbor_bstr_encode_ptr(zse, image_dummy_info[i].hash, IMG_MGMT_DATA_SHA_LEN) && in img_read_response()
176 struct zcbor_string hash; in img_state_write_verify() local
181 ZCBOR_MAP_DECODE_KEY_DECODER("hash", zcbor_bstr_decode, &hash) in img_state_write_verify()
190 hash.len = 0; in img_state_write_verify()
198 if (hash.len) { in img_state_write_verify()
199 printf("HASH %d", hash.len); in img_state_write_verify()
200 if (memcmp(hash.value, image_dummy_info[1].hash, 32) == 0) { in img_state_write_verify()
286 image_dummy_info[0].hash[i] = i + 32; in img_gr_stub_data_init()
287 image_dummy_info[1].hash[i] = i + 64; in img_gr_stub_data_init()
/Zephyr-latest/subsys/bluetooth/mesh/
Ddfu_metadata.c74 int bt_mesh_dfu_metadata_comp_hash_get(struct net_buf_simple *buf, uint8_t *key, uint32_t *hash) in bt_mesh_dfu_metadata_comp_hash_get() argument
85 *hash = sys_get_le32(mac); in bt_mesh_dfu_metadata_comp_hash_get()
90 int bt_mesh_dfu_metadata_comp_hash_local_get(uint8_t *key, uint32_t *hash) in bt_mesh_dfu_metadata_comp_hash_local_get() argument
100 err = bt_mesh_dfu_metadata_comp_hash_get(&buf, key, hash); in bt_mesh_dfu_metadata_comp_hash_local_get()
/Zephyr-latest/scripts/build/
Dllext_slidlib.py41 hash = m.digest()
42 return int.from_bytes(hash[0:slid_size], byteorder='big', signed=False)
/Zephyr-latest/include/zephyr/bluetooth/mesh/
Ddfu_metadata.h98 int bt_mesh_dfu_metadata_comp_hash_get(struct net_buf_simple *buf, uint8_t *key, uint32_t *hash);
107 int bt_mesh_dfu_metadata_comp_hash_local_get(uint8_t *key, uint32_t *hash);
/Zephyr-latest/subsys/bluetooth/common/
Drpa.c86 uint8_t hash[3]; in bt_rpa_irk_matches() local
91 err = ah(irk, addr->val + 3, hash); in bt_rpa_irk_matches()
96 return !memcmp(addr->val, hash, 3); in bt_rpa_irk_matches()
/Zephyr-latest/samples/tfm_integration/psa_crypto/src/
Dpsa_crypto.c540 uint8_t *hash, size_t hash_buf_size, in crp_hash_payload() argument
573 hash, hash_buf_size, hash_len), in crp_hash_payload()
581 sf_hex_tabulate_16(&crp_fmt, hash, (size_t)(PSA_HASH_MAX_SIZE)); in crp_hash_payload()
601 uint8_t *hash, size_t hash_buf_size, in crp_sign_hash() argument
624 hash, hash_buf_size, in crp_sign_hash()
666 uint8_t *hash, size_t hash_len, in crp_verify_sign() argument
688 hash, hash_len, in crp_verify_sign()
755 uint8_t hash[PSA_HASH_MAX_SIZE] = { 0 }; in crp_test() local
840 hash, sizeof(hash), &hash_len); in crp_test()
844 hash, hash_len, in crp_test()
[all …]
/Zephyr-latest/doc/services/device_mgmt/smp_groups/
Dsmp_group_8.rst21 | ``2`` | File hash/checksum |
23 | ``3`` | Supported file hash/checksum types |
398 File hash/checksum
401 Command allows to generate a hash/checksum of an existing file at a specified
404 for generation of the output hash/checksum.
406 the base functionality, supported hash/checksum are opt-in with
410 File hash/checksum request
413 File hash/checksum request header:
443 | "type" | type of hash/checksum to perform |
447 | "off" | offset to start hash/checksum calculation at |
[all …]
/Zephyr-latest/tests/lib/hash_function/src/
Dmain.c33 uint32_t hash; in create_histogram() local
40 hash = sys_hash32(&entry, sizeof(entry)); in create_histogram()
42 bucket = hash % CONFIG_TEST_HASH_FUNC_NUM_BUCKETS; in create_histogram()
/Zephyr-latest/include/zephyr/mgmt/mcumgr/grp/img_mgmt/
Dimg_mgmt_client.h50 char hash[IMG_MGMT_DATA_SHA_LEN]; member
170 int img_mgmt_client_state_write(struct img_mgmt_client *client, char *hash, bool confirm,
/Zephyr-latest/drivers/crypto/
DKconfig.it8xxx213 SHA256 hash.
24 SHA256 hash.
/Zephyr-latest/subsys/mgmt/mcumgr/grp/fs_mgmt/
DKconfig102 bool "Checksum/hash MCUmgr functions"
104 Enable this to support the hash/checksum MCUmgr functionality,
105 individual checksum and hash types need to be enabled below.
107 from the file being read and generate the output hash/checksum.
116 Chunk size of buffer to use when calculating file checksum or hash
127 bool "SHA256 hash support"
131 Enable SHA256 hash support for MCUmgr.
134 bool "Supported hash/checksum command"
137 Enable the supported hash/checksum command which will return details on
138 supported hash and checksum types that can be used.
[all …]
/Zephyr-latest/arch/x86/zefi/
Defi.ld44 *(.gnu.hash)
48 *(.hash)
/Zephyr-latest/subsys/mgmt/mcumgr/grp/img_mgmt_client/src/
Dimg_mgmt_client.c53 struct zcbor_string hash, version; in image_state_res_fn() local
59 ZCBOR_MAP_DECODE_KEY_DECODER("hash", zcbor_bstr_decode, &hash), in image_state_res_fn()
114 hash.len = 0; in image_state_res_fn()
129 if (hash.len != IMG_MGMT_DATA_SHA_LEN || !version.len || in image_state_res_fn()
140 memcpy(image_info->image_list[image_info->image_list_length].hash, in image_state_res_fn()
141 hash.value, IMG_MGMT_DATA_SHA_LEN); in image_state_res_fn()
452 int img_mgmt_client_state_write(struct img_mgmt_client *client, char *hash, bool confirm, in img_mgmt_client_state_write() argument
476 if (hash) { in img_mgmt_client_state_write()
486 if (ok && hash) { in img_mgmt_client_state_write()
488 zcbor_bstr_encode_ptr(zse, hash, IMG_MGMT_DATA_SHA_LEN); in img_mgmt_client_state_write()
/Zephyr-latest/tests/arch/arm/arm_thread_swap_tz/src/
Dmain.c25 static void do_hash(char *hash) in do_hash() argument
31 sizeof(dummy_string), hash, HASH_LEN, &len); in do_hash()

12345