Lines Matching full:16
60 int bt_encrypt_le(const uint8_t key[16], const uint8_t plaintext[16], in bt_encrypt_le() argument
61 uint8_t enc_data[16]) in bt_encrypt_le() argument
67 uint8_t tmp[16]; in bt_encrypt_le()
73 LOG_DBG("key %s", bt_hex(key, 16)); in bt_encrypt_le()
74 LOG_DBG("plaintext %s", bt_hex(plaintext, 16)); in bt_encrypt_le()
76 sys_memcpy_swap(tmp, key, 16); in bt_encrypt_le()
82 if (psa_import_key(&attr, tmp, 16, &key_id) != PSA_SUCCESS) { in bt_encrypt_le()
87 sys_memcpy_swap(tmp, plaintext, 16); in bt_encrypt_le()
89 status = psa_cipher_encrypt(key_id, PSA_ALG_ECB_NO_PADDING, tmp, 16, in bt_encrypt_le()
90 enc_data, 16, &out_len); in bt_encrypt_le()
104 sys_mem_swap(enc_data, 16); in bt_encrypt_le()
106 LOG_DBG("enc_data %s", bt_hex(enc_data, 16)); in bt_encrypt_le()
111 int bt_encrypt_be(const uint8_t key[16], const uint8_t plaintext[16], in bt_encrypt_be() argument
112 uint8_t enc_data[16]) in bt_encrypt_be() argument
123 LOG_DBG("key %s", bt_hex(key, 16)); in bt_encrypt_be()
124 LOG_DBG("plaintext %s", bt_hex(plaintext, 16)); in bt_encrypt_be()
130 if (psa_import_key(&attr, key, 16, &key_id) != PSA_SUCCESS) { in bt_encrypt_be()
136 plaintext, 16, enc_data, 16, &out_len); in bt_encrypt_be()
150 LOG_DBG("enc_data %s", bt_hex(enc_data, 16)); in bt_encrypt_be()