/hal_espressif-2.7.6/components/wpa_supplicant/src/tls/ |
D | rsa.c | 63 struct crypto_rsa_key *key; in crypto_rsa_import_public_key() local 67 key = (struct crypto_rsa_key *)os_zalloc(sizeof(*key)); in crypto_rsa_import_public_key() 68 if (key == NULL) in crypto_rsa_import_public_key() 71 key->n = bignum_init(); in crypto_rsa_import_public_key() 72 key->e = bignum_init(); in crypto_rsa_import_public_key() 73 if (key->n == NULL || key->e == NULL) { in crypto_rsa_import_public_key() 74 crypto_rsa_free(key); in crypto_rsa_import_public_key() 97 pos = crypto_rsa_parse_integer(pos, end, key->n); in crypto_rsa_import_public_key() 98 pos = crypto_rsa_parse_integer(pos, end, key->e); in crypto_rsa_import_public_key() 110 return key; in crypto_rsa_import_public_key() [all …]
|
/hal_espressif-2.7.6/components/bt/esp_ble_mesh/mesh_core/storage/ |
D | settings_nvs.c | 225 static int settings_save(bt_mesh_nvs_handle_t handle, const char *key, const uint8_t *val, size_t l… in settings_save() argument 229 if (key == NULL) { in settings_save() 234 BT_DBG("nvs %s, key %s", val ? "set" : "erase", key); in settings_save() 237 err = nvs_set_blob(handle, key, val, len); in settings_save() 239 err = nvs_erase_key(handle, key); in settings_save() 241 BT_DBG("%s not exists", key); in settings_save() 247 val ? "set" : "erase", key, err); in settings_save() 260 int bt_mesh_save_settings(bt_mesh_nvs_handle_t handle, const char *key, in bt_mesh_save_settings() argument 265 err = settings_save(handle, key, val, len); in bt_mesh_save_settings() 270 int bt_mesh_save_core_settings(const char *key, const uint8_t *val, size_t len) in bt_mesh_save_core_settings() argument [all …]
|
D | settings_nvs.h | 42 int bt_mesh_save_settings(bt_mesh_nvs_handle_t handle, const char *key, 44 int bt_mesh_save_core_settings(const char *key, const uint8_t *val, size_t len); 45 int bt_mesh_save_uid_settings(const char *key, const uint8_t *val, size_t len); 47 int bt_mesh_erase_settings(bt_mesh_nvs_handle_t handle, const char *key); 48 int bt_mesh_erase_core_settings(const char *key); 51 int bt_mesh_load_settings(bt_mesh_nvs_handle_t handle, const char *key, 53 int bt_mesh_load_core_settings(const char *key, uint8_t *buf, size_t buf_len, bool *exist); 54 int bt_mesh_load_uid_settings(const char *key, uint8_t *buf, size_t buf_len, bool *exist); 56 struct net_buf_simple *bt_mesh_get_settings_item(bt_mesh_nvs_handle_t handle, const char *key); 57 struct net_buf_simple *bt_mesh_get_core_settings_item(const char *key); [all …]
|
/hal_espressif-2.7.6/components/pthread/test/ |
D | test_pthread_local_storage.c | 11 pthread_key_t key; variable 12 TEST_ASSERT_EQUAL(0, pthread_key_create(&key, NULL)); 14 TEST_ASSERT_NULL(pthread_getspecific(key)); 18 TEST_ASSERT_EQUAL(0, pthread_setspecific(key, &val)); 21 TEST_ASSERT_EQUAL_PTR(&val, pthread_getspecific(key)); 24 TEST_ASSERT_EQUAL(0, pthread_setspecific(key, NULL)); 27 TEST_ASSERT_NULL(pthread_getspecific(key)); 29 TEST_ASSERT_EQUAL(0, pthread_key_delete(key)); 63 pthread_key_t key = -1; variable 68 TEST_ASSERT_EQUAL(0, pthread_key_create(&key, test_pthread_destructor)); [all …]
|
/hal_espressif-2.7.6/components/wpa_supplicant/src/crypto/ |
D | crypto_internal-rsa.c | 26 struct crypto_public_key * crypto_public_key_import(const u8 *key, size_t len) in crypto_public_key_import() argument 29 crypto_rsa_import_public_key(key, len); in crypto_public_key_import() 32 struct crypto_private_key * crypto_private_key_import(const u8 *key, in crypto_private_key_import() argument 39 res = pkcs8_key_import(key, len); in crypto_private_key_import() 45 res = pkcs8_enc_key_import(key, len, passwd); in crypto_private_key_import() 54 crypto_rsa_import_private_key(key, len); in crypto_private_key_import() 66 int crypto_public_key_encrypt_pkcs1_v15(struct crypto_public_key *key, in crypto_public_key_encrypt_pkcs1_v15() argument 70 return pkcs1_encrypt(2, (struct crypto_rsa_key *) key, in crypto_public_key_encrypt_pkcs1_v15() 75 int crypto_private_key_decrypt_pkcs1_v15(struct crypto_private_key *key, in crypto_private_key_decrypt_pkcs1_v15() argument 79 return pkcs1_v15_private_key_decrypt((struct crypto_rsa_key *) key, in crypto_private_key_decrypt_pkcs1_v15() [all …]
|
D | aes_wrap.h | 27 int __must_check omac1_aes_vector(const u8 *key, size_t key_len, 30 int __must_check omac1_aes_128_vector(const u8 *key, size_t num_elem, 33 int __must_check omac1_aes_128(const u8 *key, const u8 *data, size_t data_len, 35 int __must_check omac1_aes_256(const u8 *key, const u8 *data, size_t data_len, 37 int __must_check aes_128_encrypt_block(const u8 *key, const u8 *in, u8 *out); 38 int __must_check aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce, 40 int __must_check aes_128_ctr_encrypt(const u8 *key, const u8 *nonce, 42 int __must_check aes_128_eax_encrypt(const u8 *key, 46 int __must_check aes_128_eax_decrypt(const u8 *key, 50 int __must_check aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data, [all …]
|
/hal_espressif-2.7.6/components/pthread/ |
D | pthread_local_storage.c | 37 pthread_key_t key; member 49 pthread_key_t key; member 58 int pthread_key_create(pthread_key_t *key, pthread_destructor_t destructor) in pthread_key_create() argument 68 new_key->key = (head == NULL) ? 1 : (head->key + 1); in pthread_key_create() 70 *key = new_key->key; in pthread_key_create() 78 static key_entry_t *find_key(pthread_key_t key) in find_key() argument 83 if(result->key == key) { in find_key() 91 int pthread_key_delete(pthread_key_t key) in pthread_key_delete() argument 100 key_entry_t *entry = find_key(key); in pthread_key_delete() 134 key_entry_t *key = find_key(entry->key); in pthread_local_storage_thread_deleted_callback() local [all …]
|
/hal_espressif-2.7.6/examples/bluetooth/esp_ble_mesh/common_components/example_nvs/ |
D | ble_mesh_example_nvs.c | 38 esp_err_t ble_mesh_nvs_store(nvs_handle_t handle, const char *key, const void *data, size_t length) in ble_mesh_nvs_store() argument 42 if (key == NULL || data == NULL || length == 0) { in ble_mesh_nvs_store() 47 err = nvs_set_blob(handle, key, data, length); in ble_mesh_nvs_store() 59 ESP_LOGI(TAG, "Store, key \"%s\", length %u", key, length); in ble_mesh_nvs_store() 64 esp_err_t ble_mesh_nvs_get_length(nvs_handle_t handle, const char *key, size_t *length) in ble_mesh_nvs_get_length() argument 68 if (key == NULL || length == NULL) { in ble_mesh_nvs_get_length() 73 err = nvs_get_blob(handle, key, NULL, length); in ble_mesh_nvs_get_length() 75 ESP_LOGI(TAG, "Get length, key \"%s\" not exists", key); in ble_mesh_nvs_get_length() 83 ESP_LOGI(TAG, "Get length, key \"%s\", length %u", key, *length); in ble_mesh_nvs_get_length() 89 esp_err_t ble_mesh_nvs_restore(nvs_handle_t handle, const char *key, void *data, size_t length, boo… in ble_mesh_nvs_restore() argument [all …]
|
/hal_espressif-2.7.6/components/nvs_flash/src/ |
D | nvs_handle_locked.cpp | 27 esp_err_t NVSHandleLocked::set_string(const char *key, const char* str) { in set_string() argument 29 return handle->set_string(key, str); in set_string() 32 esp_err_t NVSHandleLocked::set_blob(const char *key, const void* blob, size_t len) { in set_blob() argument 34 return handle->set_blob(key, blob, len); in set_blob() 37 esp_err_t NVSHandleLocked::get_string(const char *key, char* out_str, size_t len) { in get_string() argument 39 return handle->get_string(key, out_str, len); in get_string() 42 esp_err_t NVSHandleLocked::get_blob(const char *key, void* out_blob, size_t len) { in get_blob() argument 44 return handle->get_blob(key, out_blob, len); in get_blob() 47 esp_err_t NVSHandleLocked::get_item_size(ItemType datatype, const char *key, size_t &size) { in get_item_size() argument 49 return handle->get_item_size(datatype, key, size); in get_item_size() [all …]
|
D | nvs_handle_simple.cpp | 24 esp_err_t NVSHandleSimple::set_typed_item(ItemType datatype, const char *key, const void* data, siz… in set_typed_item() argument 29 return mStoragePtr->writeItem(mNsIndex, datatype, key, data, dataSize); in set_typed_item() 32 esp_err_t NVSHandleSimple::get_typed_item(ItemType datatype, const char *key, void* data, size_t da… in get_typed_item() argument 36 return mStoragePtr->readItem(mNsIndex, datatype, key, data, dataSize); in get_typed_item() 39 esp_err_t NVSHandleSimple::set_string(const char *key, const char* str) in set_string() argument 44 return mStoragePtr->writeItem(mNsIndex, nvs::ItemType::SZ, key, str, strlen(str) + 1); in set_string() 47 esp_err_t NVSHandleSimple::set_blob(const char *key, const void* blob, size_t len) in set_blob() argument 52 return mStoragePtr->writeItem(mNsIndex, nvs::ItemType::BLOB, key, blob, len); in set_blob() 55 esp_err_t NVSHandleSimple::get_string(const char *key, char* out_str, size_t len) in get_string() argument 59 return mStoragePtr->readItem(mNsIndex, nvs::ItemType::SZ, key, out_str, len); in get_string() [all …]
|
D | nvs_api.cpp | 307 extern "C" esp_err_t nvs_erase_key(nvs_handle_t c_handle, const char* key) in nvs_erase_key() argument 310 ESP_LOGD(TAG, "%s %s\r\n", __func__, key); in nvs_erase_key() 317 return handle->erase_item(key); in nvs_erase_key() 334 static esp_err_t nvs_set(nvs_handle_t c_handle, const char* key, T value) in nvs_set() argument 337 ESP_LOGD(TAG, "%s %s %d %d", __func__, key, sizeof(T), (uint32_t) value); in nvs_set() 344 return handle->set_item(key, value); in nvs_set() 347 extern "C" esp_err_t nvs_set_i8 (nvs_handle_t handle, const char* key, int8_t value) in nvs_set_i8() argument 349 return nvs_set(handle, key, value); in nvs_set_i8() 352 extern "C" esp_err_t nvs_set_u8 (nvs_handle_t handle, const char* key, uint8_t value) in nvs_set_u8() argument 354 return nvs_set(handle, key, value); in nvs_set_u8() [all …]
|
D | nvs_storage.hpp | 53 char key[Item::MAX_KEY_LENGTH + 1]; member 76 …esp_err_t writeItem(uint8_t nsIndex, ItemType datatype, const char* key, const void* data, size_t … 78 …esp_err_t readItem(uint8_t nsIndex, ItemType datatype, const char* key, void* data, size_t dataSiz… 80 … esp_err_t getItemDataSize(uint8_t nsIndex, ItemType datatype, const char* key, size_t& dataSize); 82 esp_err_t eraseItem(uint8_t nsIndex, ItemType datatype, const char* key); 85 esp_err_t writeItem(uint8_t nsIndex, const char* key, const T& value) in writeItem() argument 87 return writeItem(nsIndex, itemTypeOf(value), key, &value, sizeof(value)); in writeItem() 91 esp_err_t readItem(uint8_t nsIndex, const char* key, T& value) in readItem() argument 93 return readItem(nsIndex, itemTypeOf(value), key, &value, sizeof(value)); in readItem() 96 esp_err_t eraseItem(uint8_t nsIndex, const char* key) in eraseItem() argument [all …]
|
D | nvs_types.hpp | 60 char key[NVS_KEY_NAME_MAX_SIZE]; member 79 static const size_t MAX_KEY_LENGTH = sizeof(key) - 1; 88 std::fill_n(reinterpret_cast<uint32_t*>(key), sizeof(key) / 4, 0xffffffff); in Item() 91 strncpy(key, key_, sizeof(key) - 1); in Item() 92 key[sizeof(key) - 1] = 0; in Item() 94 key[0] = 0; in Item() 108 strncpy(dst, key, min(dstSize, sizeof(key))); in getKey()
|
/hal_espressif-2.7.6/components/nvs_flash/include/ |
D | nvs.h | 108 char key[16]; /*!< Key of stored key-value pair */ member 199 esp_err_t nvs_set_i8 (nvs_handle_t handle, const char* key, int8_t value); 200 esp_err_t nvs_set_u8 (nvs_handle_t handle, const char* key, uint8_t value); 201 esp_err_t nvs_set_i16 (nvs_handle_t handle, const char* key, int16_t value); 202 esp_err_t nvs_set_u16 (nvs_handle_t handle, const char* key, uint16_t value); 203 esp_err_t nvs_set_i32 (nvs_handle_t handle, const char* key, int32_t value); 204 esp_err_t nvs_set_u32 (nvs_handle_t handle, const char* key, uint32_t value); 205 esp_err_t nvs_set_i64 (nvs_handle_t handle, const char* key, int64_t value); 206 esp_err_t nvs_set_u64 (nvs_handle_t handle, const char* key, uint64_t value); 207 esp_err_t nvs_set_str (nvs_handle_t handle, const char* key, const char* value); [all …]
|
D | nvs_handle.hpp | 67 esp_err_t set_item(const char *key, T value); 69 esp_err_t set_string(const char *key, const char* value) = 0; 92 esp_err_t get_item(const char *key, T &value); 120 virtual esp_err_t set_blob(const char *key, const void* blob, size_t len) = 0; 150 virtual esp_err_t get_string(const char *key, char* out_str, size_t len) = 0; 151 virtual esp_err_t get_blob(const char *key, void* out_blob, size_t len) = 0; 158 virtual esp_err_t get_item_size(ItemType datatype, const char *key, size_t &size) = 0; 163 virtual esp_err_t erase_item(const char* key) = 0; 195 …virtual esp_err_t set_typed_item(ItemType datatype, const char *key, const void* data, size_t data… 197 …virtual esp_err_t get_typed_item(ItemType datatype, const char *key, void* data, size_t dataSize) … [all …]
|
/hal_espressif-2.7.6/components/esp_http_client/lib/ |
D | http_header.c | 32 char *key; /*!< key */ member 55 http_header_item_handle_t http_header_get_item(http_header_handle_t header, const char *key) in http_header_get_item() argument 58 if (header == NULL || key == NULL) { in http_header_get_item() 62 if (strcasecmp(item->key, key) == 0) { in http_header_get_item() 69 esp_err_t http_header_get(http_header_handle_t header, const char *key, char **value) in http_header_get() argument 73 item = http_header_get_item(header, key); in http_header_get() 83 static esp_err_t http_header_new_item(http_header_handle_t header, const char *key, const char *val… in http_header_new_item() argument 89 http_utils_assign_string(&item->key, key, -1); in http_header_new_item() 90 HTTP_MEM_CHECK(TAG, item->key, goto _header_new_item_exit); in http_header_new_item() 91 http_utils_trim_whitespace(&item->key); in http_header_new_item() [all …]
|
/hal_espressif-2.7.6/components/bt/esp_ble_mesh/mesh_common/tinycrypt/src/ |
D | hmac.c | 37 static void rekey(uint8_t *key, const uint8_t *new_key, unsigned int key_size) in rekey() argument 44 key[i] = inner_pad ^ new_key[i]; in rekey() 45 key[i + TC_SHA256_BLOCK_SIZE] = outer_pad ^ new_key[i]; in rekey() 48 key[i] = inner_pad; key[i + TC_SHA256_BLOCK_SIZE] = outer_pad; in rekey() 52 int tc_hmac_set_key(TCHmacState_t ctx, const uint8_t *key, in tc_hmac_set_key() argument 57 key == (const uint8_t *) 0 || in tc_hmac_set_key() 77 (void)tc_sha256_final(&dummy_state.key[TC_SHA256_DIGEST_SIZE], in tc_hmac_set_key() 81 rekey(ctx->key, key, key_size); in tc_hmac_set_key() 84 (void)tc_sha256_update(&ctx->hash_state, key, key_size); in tc_hmac_set_key() 85 (void)tc_sha256_final(&ctx->key[TC_SHA256_DIGEST_SIZE], in tc_hmac_set_key() [all …]
|
D | hmac_prng.c | 84 tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in update() 98 (void)tc_hmac_final(prng->key, sizeof(prng->key), &prng->h); in update() 101 (void)tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in update() 113 tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in update() 123 (void)tc_hmac_final(prng->key, sizeof(prng->key), &prng->h); in update() 126 (void)tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in update() 147 _set(prng->key, 0x00, sizeof(prng->key)); in tc_hmac_prng_init() 214 tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in tc_hmac_prng_generate()
|
/hal_espressif-2.7.6/components/bt/host/bluedroid/btc/core/ |
D | btc_config.c | 121 bool btc_config_exist(const char *section, const char *key) in btc_config_exist() argument 125 assert(key != NULL); in btc_config_exist() 127 return config_has_key(config, section, key); in btc_config_exist() 130 bool btc_config_get_int(const char *section, const char *key, int *value) in btc_config_get_int() argument 134 assert(key != NULL); in btc_config_get_int() 137 bool ret = config_has_key(config, section, key); in btc_config_get_int() 139 *value = config_get_int(config, section, key, *value); in btc_config_get_int() 145 bool btc_config_set_int(const char *section, const char *key, int value) in btc_config_set_int() argument 149 assert(key != NULL); in btc_config_set_int() 151 config_set_int(config, section, key, value); in btc_config_set_int() [all …]
|
/hal_espressif-2.7.6/examples/system/console/components/cmd_nvs/ |
D | cmd_nvs.c | 49 struct arg_str *key; member 56 struct arg_str *key; member 62 struct arg_str *key; member 108 static esp_err_t store_blob(nvs_handle_t nvs, const char *key, const char *str_values) in store_blob() argument 145 esp_err_t err = nvs_set_blob(nvs, key, blob, blob_len); in store_blob() 164 static esp_err_t set_value_in_nvs(const char *key, const char *str_type, const char *str_value) in set_value_in_nvs() argument 187 err = nvs_set_i8(nvs, key, (int8_t)value); in set_value_in_nvs() 194 err = nvs_set_u8(nvs, key, (uint8_t)value); in set_value_in_nvs() 201 err = nvs_set_i16(nvs, key, (int16_t)value); in set_value_in_nvs() 208 err = nvs_set_u16(nvs, key, (uint16_t)value); in set_value_in_nvs() [all …]
|
/hal_espressif-2.7.6/components/bt/esp_ble_mesh/mesh_core/ |
D | fast_prov.c | 71 struct bt_mesh_app_key *key = NULL; in bt_mesh_fast_prov_app_key_find() local 75 key = &bt_mesh.app_keys[i]; in bt_mesh_fast_prov_app_key_find() 76 if (key->net_idx != BLE_MESH_KEY_UNUSED && in bt_mesh_fast_prov_app_key_find() 77 key->app_idx == app_idx) { in bt_mesh_fast_prov_app_key_find() 78 return key; in bt_mesh_fast_prov_app_key_find() 83 key = bt_mesh.p_app_keys[i]; in bt_mesh_fast_prov_app_key_find() 84 if (key && key->net_idx != BLE_MESH_KEY_UNUSED && in bt_mesh_fast_prov_app_key_find() 85 key->app_idx == app_idx) { in bt_mesh_fast_prov_app_key_find() 86 return key; in bt_mesh_fast_prov_app_key_find() 140 struct bt_mesh_app_key *key = NULL; in bt_mesh_get_fast_prov_app_key() local [all …]
|
/hal_espressif-2.7.6/docs/en/api-reference/peripherals/ |
D | hmac.rst | 4 …) module provides hardware acceleration for SHA256-HMAC generation using a key burned into an eFus… 12 Before they can start sending messages, they need to exchange the secret key via a secure channel. 22 It can also be used for challenge-response protocols supporting HMAC or as a key input for further … 26 On the {IDF_TARGET_NAME}, the HMAC module works with a secret key burnt into the eFuses. 27 This eFuse key can be made completely inaccessible for any resources outside the cryptographic modu… 32 #. HMAC is used as a key for the Digital Signature (DS) module 41 Each key has a corresponding eFuse parameter *key purpose* determining for which of the three HMAC … 52 - HMAC used as a key for the Digital Signature (DS) module 56 - HMAC both as a key for the DS module and for enabling JTAG 58 This is to prevent the usage of a key for a different function than originally intended. [all …]
|
/hal_espressif-2.7.6/components/bt/host/bluedroid/btc/include/btc/ |
D | btc_config.h | 30 bool btc_config_exist(const char *section, const char *key); 31 bool btc_config_get_int(const char *section, const char *key, int *value); 32 bool btc_config_set_int(const char *section, const char *key, int value); 33 bool btc_config_get_str(const char *section, const char *key, char *value, int *size_bytes); 34 bool btc_config_set_str(const char *section, const char *key, const char *value); 35 bool btc_config_get_bin(const char *section, const char *key, uint8_t *value, size_t *length); 36 bool btc_config_set_bin(const char *section, const char *key, const uint8_t *value, size_t length); 37 bool btc_config_remove(const char *section, const char *key); 40 size_t btc_config_get_bin_length(const char *section, const char *key);
|
/hal_espressif-2.7.6/components/bt/common/osi/include/osi/ |
D | config.h | 67 bool config_has_key(const config_t *config, const char *section, const char *key); 71 bool config_has_key_in_section(config_t *config, const char *key, char *key_value); 77 int config_get_int(const config_t *config, const char *section, const char *key, int def_value); 82 bool config_get_bool(const config_t *config, const char *section, const char *key, bool def_value); 88 const char *config_get_string(const config_t *config, const char *section, const char *key, const c… 93 void config_set_int(config_t *config, const char *section, const char *key, int value); 98 void config_set_bool(config_t *config, const char *section, const char *key, bool value); 103 void config_set_string(config_t *config, const char *section, const char *key, const char *value, b… 113 bool config_remove_key(config_t *config, const char *section, const char *key);
|
/hal_espressif-2.7.6/components/bt/common/osi/ |
D | hash_functions.c | 23 hash_index_t hash_function_naive(const void *key) in hash_function_naive() argument 25 return (hash_index_t)key; in hash_function_naive() 28 hash_index_t hash_function_integer(const void *key) in hash_function_integer() argument 30 return ((hash_index_t)key) * 2654435761; in hash_function_integer() 33 hash_index_t hash_function_pointer(const void *key) in hash_function_pointer() argument 35 return ((hash_index_t)key) * 2654435761; in hash_function_pointer() 38 hash_index_t hash_function_string(const void *key) in hash_function_string() argument 41 const char *name = (const char *)key; in hash_function_string()
|