Home
last modified time | relevance | path

Searched +full:key +full:- +full:int (Results 1 – 25 of 884) sorted by relevance

12345678910>>...36

/Zephyr-latest/tests/cmake/yaml/
DCMakeLists.txt1 # SPDX-License-Identifier: Apache-2.0
43 yaml_get(actual NAME yaml-test KEY cmake test key-string)
46 COMMENT "yaml key value does not match expectation."
52 yaml_length(actual NAME yaml-test KEY cmake test key-list-string)
58 yaml_get(actual NAME yaml-test KEY cmake test key-list-string)
69 yaml_get(actual NAME yaml-test KEY cmake test key-int)
72 COMMENT "yaml key value does not match expectation."
78 yaml_length(actual NAME yaml-test KEY cmake test key-list-int)
84 yaml_get(actual NAME yaml-test KEY cmake test key-list-int)
95 yaml_get(actual NAME yaml-test KEY cmake test key-int)
[all …]
Dtest.yaml3 key-string: "Simple string"
4 key-int: 42
5 key-list-int:
6 - 4
7 - 10
8 - 2
9 key-list-string:
10 - "a"
11 - "list"
12 - "of"
[all …]
/Zephyr-latest/subsys/bluetooth/mesh/
Dcrypto_tc.c5 * SPDX-License-Identifier: Apache-2.0
36 int bt_mesh_encrypt(const struct bt_mesh_key *key, const uint8_t plaintext[16], in bt_mesh_encrypt() argument
39 return bt_encrypt_be(key->key, plaintext, enc_data); in bt_mesh_encrypt()
42 int bt_mesh_ccm_encrypt(const struct bt_mesh_key *key, uint8_t nonce[13], const uint8_t *plaintext, in bt_mesh_ccm_encrypt() argument
46 return bt_ccm_encrypt(key->key, nonce, plaintext, len, aad, aad_len, enc_data, mic_size); in bt_mesh_ccm_encrypt()
49 int bt_mesh_ccm_decrypt(const struct bt_mesh_key *key, uint8_t nonce[13], const uint8_t *enc_data, in bt_mesh_ccm_decrypt() argument
53 return bt_ccm_decrypt(key->key, nonce, enc_data, len, aad, aad_len, plaintext, mic_size); in bt_mesh_ccm_decrypt()
56 int bt_mesh_aes_cmac_raw_key(const uint8_t key[16], struct bt_mesh_sg *sg, size_t sg_len, in bt_mesh_aes_cmac_raw_key()
62 if (tc_cmac_setup(&state, key, &sched) == TC_CRYPTO_FAIL) { in bt_mesh_aes_cmac_raw_key()
63 return -EIO; in bt_mesh_aes_cmac_raw_key()
[all …]
Dcrypto_psa.c4 * SPDX-License-Identifier: Apache-2.0
21 * application keys (2 real keys per 1 configured) and device key + device key candidate.
35 "BLE Mesh PSA key id range overlaps maximum allowed boundary.");
38 "MAC length should be 16 bytes for 128-bits key for CMAC-AES");
41 "MAC length should be 32 bytes for 256-bits key for HMAC-SHA");
51 int bt_mesh_crypto_init(void) in bt_mesh_crypto_init()
54 return -EIO; in bt_mesh_crypto_init()
60 int bt_mesh_encrypt(const struct bt_mesh_key *key, const uint8_t plaintext[16], in bt_mesh_encrypt() argument
65 int err = 0; in bt_mesh_encrypt()
67 status = psa_cipher_encrypt(key->key, PSA_ALG_ECB_NO_PADDING, in bt_mesh_encrypt()
[all …]
Dcrypto.h5 * SPDX-License-Identifier: Apache-2.0
21 int bt_mesh_crypto_init(void);
23 int bt_mesh_encrypt(const struct bt_mesh_key *key, const uint8_t plaintext[16],
26 int bt_mesh_ccm_encrypt(const struct bt_mesh_key *key, uint8_t nonce[13], const uint8_t *plaintext,
30 int bt_mesh_ccm_decrypt(const struct bt_mesh_key *key, uint8_t nonce[13], const uint8_t *enc_data,
34 int bt_mesh_aes_cmac_mesh_key(const struct bt_mesh_key *key, struct bt_mesh_sg *sg, size_t sg_len,
37 int bt_mesh_aes_cmac_raw_key(const uint8_t key[16], struct bt_mesh_sg *sg, size_t sg_len,
40 int bt_mesh_sha256_hmac_raw_key(const uint8_t key[32], struct bt_mesh_sg *sg, size_t sg_len,
43 int bt_mesh_s1(const char *m, size_t m_len, uint8_t salt[16]);
45 static inline int bt_mesh_s1_str(const char *m, uint8_t salt[16]) in bt_mesh_s1_str()
[all …]
Dcdb.c4 * SPDX-License-Identifier: Apache-2.0
30 * bt_mesh_app_key and bt_mesh_subnet structs themselves, since once a key
37 clear:1; /* 1 if key needs clearing, 0 if storing */
86 [0 ... (CONFIG_BT_MESH_CDB_NODE_COUNT - 1)] = {
91 [0 ... (CONFIG_BT_MESH_CDB_SUBNET_COUNT - 1)] = {
96 [0 ... (CONFIG_BT_MESH_CDB_APP_KEY_COUNT - 1)] = {
104 * Check if an address range from addr_start for addr_start + num_elem - 1 is
106 * available after the conflicting range and -EAGAIN will be returned.
108 static int addr_is_free(uint16_t addr_start, uint8_t num_elem, uint16_t *next) in addr_is_free()
110 uint16_t addr_end = addr_start + num_elem - 1; in addr_is_free()
[all …]
/Zephyr-latest/tests/posix/common/src/
Dkey.c4 * SPDX-License-Identifier: Apache-2.0
16 static pthread_key_t key; variable
28 zassert_ok(pthread_setspecific(key, value), "pthread_setspecific failed"); in thread_top()
29 zassert_equal(pthread_getspecific(key), value, "set and retrieved values are different"); in thread_top()
42 for (int i = 0; i < N_KEY; i++) { in thread_func()
53 zassert_ok(pthread_key_create(&key, NULL), "insufficient memory to create key"); in make_key()
58 for (int i = 0; i < N_KEY; i++) { in make_keys()
68 * create a key via pthread_key_create() API. It then sets the
69 * thread-specific value to the key using pthread_setspecific() and
71 * are equal. It then deletes the key using pthread_key_delete().
[all …]
/Zephyr-latest/kernel/
Dobj_core.c4 * SPDX-License-Identifier: Apache-2.0
17 sys_slist_init(&type->list); in z_obj_type_init()
18 sys_slist_append(&z_obj_type_list, &type->node); in z_obj_type_init()
19 type->id = id; in z_obj_type_init()
20 type->obj_core_offset = off; in z_obj_type_init()
27 obj_core->node.next = NULL; in k_obj_core_init()
28 obj_core->type = type; in k_obj_core_init()
30 obj_core->stats = NULL; in k_obj_core_init()
36 k_spinlock_key_t key = k_spin_lock(&lock); in k_obj_core_link() local
38 sys_slist_append(&obj_core->type->list, &obj_core->node); in k_obj_core_link()
[all …]
Dpoll.c5 * SPDX-License-Identifier: Apache-2.0
29 /* Single subsystem lock. Locking per-event would be better on highly
40 static int signal_poller(struct k_poll_event *event, uint32_t state);
41 static int signal_triggered_work(struct k_poll_event *event, uint32_t status);
44 int mode, void *obj) in k_poll_event_init()
51 event->poller = NULL; in k_poll_event_init()
52 /* event->tag is left uninitialized: the user will set it if needed */ in k_poll_event_init()
53 event->type = type; in k_poll_event_init()
54 event->state = K_POLL_STATE_NOT_READY; in k_poll_event_init()
55 event->mode = mode; in k_poll_event_init()
[all …]
/Zephyr-latest/tests/bluetooth/host/keys/bt_keys_add_type/src/
Dmain.c4 * SPDX-License-Identifier: Apache-2.0
15 /* This LUT contains different key types */
16 static const int testing_type_lut[] = {BT_KEYS_PERIPH_LTK, BT_KEYS_IRK, BT_KEYS_LTK,
23 * Set key type and verify that the value is set correctly
26 * - Valid key reference is used
29 * - The key type value is set correctly
35 int type = testing_type_lut[it]; in ZTEST()
41 "bt_keys_add_type() set incorrect key type value"); in ZTEST()
46 * Set key type to all valid types and verify that the value is set correctly
49 * - Valid key reference is used
[all …]
/Zephyr-latest/include/zephyr/arch/arc/v2/
Darcv2_irq_unit.h1 /* arcv2_irq_unit.h - ARCv2 Interrupt Unit device driver */
7 * SPDX-License-Identifier: Apache-2.0
34 * Locking the interrupts inside of the APIs are some kind of self-protection
50 int irq, in z_arc_v2_irq_unit_irq_enable_set()
54 unsigned int key = arch_irq_lock(); in z_arc_v2_irq_unit_irq_enable_set() local
59 arch_irq_unlock(key); in z_arc_v2_irq_unit_irq_enable_set()
69 void z_arc_v2_irq_unit_int_enable(int irq) in z_arc_v2_irq_unit_int_enable()
81 void z_arc_v2_irq_unit_int_disable(int irq) in z_arc_v2_irq_unit_int_disable()
95 bool z_arc_v2_irq_unit_int_enabled(int irq) in z_arc_v2_irq_unit_int_enabled()
98 unsigned int key = arch_irq_lock(); in z_arc_v2_irq_unit_int_enabled() local
[all …]
/Zephyr-latest/include/zephyr/arch/nios2/
Darch.h4 * SPDX-License-Identifier: Apache-2.0
48 static ALWAYS_INLINE unsigned int arch_irq_lock(void) in arch_irq_lock()
50 unsigned int key, tmp; in arch_irq_lock() local
53 "rdctl %[key], status\n\t" in arch_irq_lock()
54 "movi %[tmp], -2\n\t" in arch_irq_lock()
55 "and %[tmp], %[key], %[tmp]\n\t" in arch_irq_lock()
57 : [key] "=r" (key), [tmp] "=r" (tmp) in arch_irq_lock()
60 return key; in arch_irq_lock()
63 static ALWAYS_INLINE void arch_irq_unlock(unsigned int key) in arch_irq_unlock() argument
67 * in which case we can just write the value stored in key, in arch_irq_unlock()
[all …]
/Zephyr-latest/include/zephyr/arch/arm64/
Dasm_inline_gcc.h4 * SPDX-License-Identifier: Apache-2.0
26 static ALWAYS_INLINE unsigned int arch_irq_lock(void) in arch_irq_lock()
28 unsigned int key; in arch_irq_lock() local
31 * Return the whole DAIF register as key but use DAIFSET to disable in arch_irq_lock()
34 key = read_daif(); in arch_irq_lock()
37 return key; in arch_irq_lock()
40 static ALWAYS_INLINE void arch_irq_unlock(unsigned int key) in arch_irq_unlock() argument
42 write_daif(key); in arch_irq_unlock()
45 static ALWAYS_INLINE bool arch_irq_unlocked(unsigned int key) in arch_irq_unlocked() argument
48 return (key & DAIF_IRQ_BIT) == 0; in arch_irq_unlocked()
/Zephyr-latest/tests/kernel/fatal/no-multithreading/src/
Dmain.c4 * SPDX-License-Identifier: Apache-2.0
14 static ZTEST_DMEM volatile int expected_reason = -1;
16 void k_sys_fatal_error_handler(unsigned int reason, const struct arch_esf *pEsf) in k_sys_fatal_error_handler()
18 int rv = TC_PASS; in k_sys_fatal_error_handler()
20 TC_PRINT("Caught system error -- reason %d\n", reason); in k_sys_fatal_error_handler()
54 unsigned int key; in entry_oops() local
59 key = irq_lock(); in entry_oops()
61 irq_unlock(key); in entry_oops()
66 unsigned int key; in entry_panic() local
71 key = irq_lock(); in entry_panic()
[all …]
/Zephyr-latest/subsys/bluetooth/host/
Dsettings.h4 * SPDX-License-Identifier: Apache-2.0
14 /* Max settings key length (with all components) */
17 /* Base64-encoded string buffer size of in_size bytes */
18 #define BT_SETTINGS_SIZE(in_size) ((((((in_size) - 1) / 3) * 4) + 4) + 1)
25 int bt_settings_store(const char *key, uint8_t id, const bt_addr_le_t *addr, const void *value,
27 int bt_settings_delete(const char *key, uint8_t id, const bt_addr_le_t *addr);
29 void bt_testing_settings_store_hook(const char *key, const void *value, size_t val_len);
30 void bt_testing_settings_delete_hook(const char *key);
34 const bt_addr_le_t *addr, const char *key);
35 int bt_settings_decode_key(const char *key, bt_addr_le_t *addr);
[all …]
/Zephyr-latest/drivers/gpio/
Dgpio_mmio32.c4 * SPDX-License-Identifier: Apache-2.0
9 * @brief Driver to provide the GPIO API for a simple 32-bit i/o register
11 * This is a driver for accessing a simple, fixed purpose, 32-bit
12 * memory-mapped i/o register using the same APIs as GPIO drivers. This is
16 * chip-select line for an SPI device.
21 * stems from the use of a read-modify-write method for all changes.
33 static int gpio_mmio32_config(const struct device *dev, in gpio_mmio32_config()
36 struct gpio_mmio32_context *context = dev->data; in gpio_mmio32_config()
37 const struct gpio_mmio32_config *config = context->config; in gpio_mmio32_config()
39 if ((config->mask & (1 << pin)) == 0) { in gpio_mmio32_config()
[all …]
Dgpio_neorv32.c4 * SPDX-License-Identifier: Apache-2.0
43 const struct neorv32_gpio_config *config = dev->config; in neorv32_gpio_read()
45 return sys_read32(config->input); in neorv32_gpio_read()
50 const struct neorv32_gpio_config *config = dev->config; in neorv32_gpio_write()
52 sys_write32(val, config->output); in neorv32_gpio_write()
55 static int neorv32_gpio_pin_configure(const struct device *dev, gpio_pin_t pin, in neorv32_gpio_pin_configure()
58 const struct neorv32_gpio_config *config = dev->config; in neorv32_gpio_pin_configure()
59 struct neorv32_gpio_data *data = dev->data; in neorv32_gpio_pin_configure()
60 unsigned int key; in neorv32_gpio_pin_configure() local
62 if (!(BIT(pin) & config->common.port_pin_mask)) { in neorv32_gpio_pin_configure()
[all …]
/Zephyr-latest/lib/posix/options/
Dkey.c5 * SPDX-License-Identifier: Apache-2.0
20 /* This is non-standard (i.e. an implementation detail) */
21 #define PTHREAD_KEY_INITIALIZER (-1)
36 return k - posix_key_pool; in posix_key_to_offset()
39 static inline size_t to_posix_key_idx(pthread_key_t key) in to_posix_key_idx() argument
41 return mark_pthread_obj_uninitialized(key); in to_posix_key_idx()
44 static pthread_key_obj *get_posix_key(pthread_key_t key) in get_posix_key() argument
46 int actually_initialized; in get_posix_key()
47 size_t bit = to_posix_key_idx(key); in get_posix_key()
50 if (!is_pthread_obj_initialized(key)) { in get_posix_key()
[all …]
/Zephyr-latest/include/zephyr/bluetooth/mesh/
Dcdb.h4 * SPDX-License-Identifier: Apache-2.0
90 * ie one with NetIdx 0, will be added and the provided key will be used as
93 * @param key The NetKey to be used for the primary subnet.
97 int bt_mesh_cdb_create(const uint8_t key[16]);
101 * Remove all nodes, subnets and app-keys stored in the database and mark
135 * end of the unicast address range, or if @c addr is non-zero and less
193 /** @brief Import device key for selected node.
195 * Using security library with PSA implementation access to the key by pointer
196 * will not give a valid value since the key is hidden in the library.
197 * The application has to import the key.
[all …]
/Zephyr-latest/subsys/net/lib/wifi_credentials/
Dwifi_credentials_backend_settings.c4 * SPDX-License-Identifier: Apache-2.0
32 static int zephyr_settings_backend_load_val_cb(const char *key, size_t len, in zephyr_settings_backend_load_val_cb() argument
36 int idx = atoi(key); in zephyr_settings_backend_load_val_cb()
38 if (arg->idx != idx) { in zephyr_settings_backend_load_val_cb()
39 LOG_DBG("Skipping index [%s]", key); in zephyr_settings_backend_load_val_cb()
43 if (len != arg->buf_len) { in zephyr_settings_backend_load_val_cb()
45 return -EINVAL; in zephyr_settings_backend_load_val_cb()
48 size_t length_read = read_cb(cb_arg, arg->buf, arg->buf_len); in zephyr_settings_backend_load_val_cb()
53 return -ENODATA; in zephyr_settings_backend_load_val_cb()
56 arg->found = true; in zephyr_settings_backend_load_val_cb()
[all …]
/Zephyr-latest/subsys/bluetooth/host/classic/
Dkeys_br.c1 /* keys_br.c - Bluetooth BR/EDR key handling */
4 * Copyright (c) 2015-2016 Intel Corporation
6 * SPDX-License-Identifier: Apache-2.0
38 struct bt_keys_link_key *key; in bt_keys_find_link_key() local
39 int i; in bt_keys_find_link_key()
44 key = &key_pool[i]; in bt_keys_find_link_key()
46 if (bt_addr_eq(&key->addr, addr)) { in bt_keys_find_link_key()
47 return key; in bt_keys_find_link_key()
56 struct bt_keys_link_key *key; in bt_keys_get_link_key() local
58 key = bt_keys_find_link_key(addr); in bt_keys_get_link_key()
[all …]
/Zephyr-latest/subsys/bluetooth/controller/crypto/
Dcrypto.c2 * Copyright (c) 2016-2017 Nordic Semiconductor ASA
4 * SPDX-License-Identifier: Apache-2.0
18 int bt_rand(void *buf, size_t len) in bt_rand()
23 int bt_encrypt_le(const uint8_t key[16], const uint8_t plaintext[16], in bt_encrypt_le()
26 LOG_DBG("key %s", bt_hex(key, 16)); in bt_encrypt_le()
29 ecb_encrypt(key, plaintext, enc_data, NULL); in bt_encrypt_le()
36 int bt_encrypt_be(const uint8_t key[16], const uint8_t plaintext[16], in bt_encrypt_be()
39 LOG_DBG("key %s", bt_hex(key, 16)); in bt_encrypt_be()
42 ecb_encrypt_be(key, plaintext, enc_data); in bt_encrypt_be()
/Zephyr-latest/samples/tfm_integration/tfm_secure_partition/src/
Dmain.c4 * SPDX-License-Identifier: Apache-2.0
12 int main(void) in main()
16 for (int key = 0; key < 6; key++) { in main() local
17 psa_status_t status = dp_secret_digest(key, digest, sizeof(digest)); in main()
19 if (status == PSA_ERROR_INVALID_ARGUMENT && key == 5) { in main()
20 printk("No valid secret for key, received expected error code\n"); in main()
25 for (int i = 0; i < 32; i++) { in main()
/Zephyr-latest/lib/libc/common/source/thrd/
Dtss.c4 * SPDX-License-Identifier: Apache-2.0
13 int tss_create(tss_t *key, tss_dtor_t destructor) in tss_create() argument
15 switch (pthread_key_create(key, destructor)) { in tss_create()
27 void *tss_get(tss_t key) in tss_get() argument
29 return pthread_getspecific(key); in tss_get()
32 int tss_set(tss_t key, void *val) in tss_set() argument
34 switch (pthread_setspecific(key, val)) { in tss_set()
44 void tss_delete(tss_t key) in tss_delete() argument
46 (void)pthread_key_delete(key); in tss_delete()
/Zephyr-latest/arch/mips/core/
Dirq_manage.c6 * SPDX-License-Identifier: Apache-2.0
30 void arch_irq_enable(unsigned int irq) in arch_irq_enable()
32 unsigned int key; in arch_irq_enable() local
35 key = irq_lock(); in arch_irq_enable()
41 irq_unlock(key); in arch_irq_enable()
44 void arch_irq_disable(unsigned int irq) in arch_irq_disable()
46 unsigned int key; in arch_irq_disable() local
49 key = irq_lock(); in arch_irq_disable()
55 irq_unlock(key); in arch_irq_disable()
58 int arch_irq_is_enabled(unsigned int irq) in arch_irq_is_enabled()
[all …]

12345678910>>...36