Home
last modified time | relevance | path

Searched refs:data_len (Results 1 – 25 of 45) sorted by relevance

12

/system/nfc/src/fuzzers/nci/
Dhal.cc17 bool hal_inject_data(const uint8_t* p_data, uint16_t data_len) { in hal_inject_data() argument
19 BytesToHex(p_data, data_len).c_str()); in hal_inject_data()
24 if (data_len >= sizeof(nfc_cb.last_hdr)) { in hal_inject_data()
30 data_len); in hal_inject_data()
33 p_msg->len = data_len; in hal_inject_data()
79 static void HalWrite(uint16_t data_len, uint8_t* p_data) { in HalWrite() argument
80 FUZZLOG("HAL_OP: type=write, data=%s", BytesToHex(p_data, data_len).c_str()); in HalWrite()
82 if (data_len == sizeof(reset_req) && in HalWrite()
83 memcmp(reset_req, p_data, data_len) == 0) { in HalWrite()
86 } else if (data_len == sizeof(init_req) && in HalWrite()
[all …]
/system/keymaster/android_keymaster/
Dserializable.cpp31 uint8_t* append_to_buf(uint8_t* buf, const uint8_t* end, const void* data, size_t data_len) { in append_to_buf() argument
32 if (__buffer_bound_check(buf, end, data_len) && data != nullptr) { in append_to_buf()
33 memcpy(buf, data, data_len); in append_to_buf()
34 return buf + data_len; in append_to_buf()
99 bool Buffer::Reinitialize(const void* data, size_t data_len) { in Reinitialize() argument
101 if (__pval(data) + data_len < __pval(data)) // Pointer wrap check in Reinitialize()
103 buffer_.reset(new (std::nothrow) uint8_t[data_len]); in Reinitialize()
105 buffer_size_ = data_len; in Reinitialize()
106 memcpy(buffer_.get(), data, data_len); in Reinitialize()
/system/nfc/src/nfc/tags/
Dce_main.cc58 tNFC_STATUS CE_SendRawFrame(uint8_t* p_raw_data, uint16_t data_len) { in CE_SendRawFrame() argument
64 if (data_len > GKI_get_pool_bufsize(NFC_RW_POOL_ID) - NCI_MSG_OFFSET_SIZE - in CE_SendRawFrame()
75 memcpy(p, p_raw_data, data_len); in CE_SendRawFrame()
76 p_data->len = data_len; in CE_SendRawFrame()
77 LOG(VERBOSE) << StringPrintf("CE SENT raw frame (0x%x)", data_len); in CE_SendRawFrame()
Drw_main.cc165 tNFC_STATUS RW_SendRawFrame(uint8_t* p_raw_data, uint16_t data_len) { in RW_SendRawFrame() argument
171 if (data_len > GKI_get_pool_bufsize(NFC_RW_POOL_ID) - NCI_MSG_OFFSET_SIZE - in RW_SendRawFrame()
181 memcpy(p, p_raw_data, data_len); in RW_SendRawFrame()
182 p_data->len = data_len; in RW_SendRawFrame()
184 LOG(VERBOSE) << StringPrintf("RW SENT raw frame (0x%x)", data_len); in RW_SendRawFrame()
Dce_t4t.cc333 uint8_t data_len; in ce_t4t_process_select_file_cmd() local
341 BE_STREAM_TO_UINT8(data_len, p_cmd); in ce_t4t_process_select_file_cmd()
343 if (data_len == T4T_FILE_ID_SIZE) { in ce_t4t_process_select_file_cmd()
376 uint8_t data_len; in ce_t4t_process_select_app_cmd() local
386 BE_STREAM_TO_UINT8(data_len, p_cmd); in ce_t4t_process_select_app_cmd()
389 if (data_len > (p_c_apdu->len - T4T_CMD_MAX_HDR_SIZE)) { in ce_t4t_process_select_app_cmd()
398 if ((data_len == T4T_V20_NDEF_TAG_AID_LEN) && in ce_t4t_process_select_app_cmd()
399 (!memcmp(p_cmd, ce_test_tag_app_id, data_len)) && in ce_t4t_process_select_app_cmd()
416 (ce_cb.mem.t4t.reg_aid[xx].aid_len == data_len) && in ce_t4t_process_select_app_cmd()
417 (!(memcmp(ce_cb.mem.t4t.reg_aid[xx].aid, p_cmd, data_len)))) { in ce_t4t_process_select_app_cmd()
[all …]
/system/nfc/src/nfa/hci/
Dnfa_hci_act.cc54 static void nfa_hci_handle_loopback_gate_pkt(uint8_t* p_data, uint16_t data_len,
57 uint16_t data_len,
59 static void nfa_hci_handle_generic_gate_cmd(uint8_t* p_data, uint8_t data_len,
61 static void nfa_hci_handle_generic_gate_rsp(uint8_t* p_data, uint8_t data_len,
63 static void nfa_hci_handle_generic_gate_evt(uint8_t* p_data, uint16_t data_len,
1097 void nfa_hci_handle_link_mgm_gate_cmd(uint8_t* p_data, uint16_t data_len) { in nfa_hci_handle_link_mgm_gate_cmd() argument
1112 if (data_len < 1) { in nfa_hci_handle_link_mgm_gate_cmd()
1118 if (index == 1 && data_len > 2) { in nfa_hci_handle_link_mgm_gate_cmd()
1125 if (data_len < 1) { in nfa_hci_handle_link_mgm_gate_cmd()
1199 void nfa_hci_handle_admin_gate_cmd(uint8_t* p_data, uint16_t data_len) { in nfa_hci_handle_admin_gate_cmd() argument
[all …]
Dnfa_hci_utils.cc305 uint16_t data_len; in nfa_hciu_send_msg() local
333 data_len = in nfa_hciu_send_msg()
339 if (msg_len > data_len) { in nfa_hciu_send_msg()
342 data_len = msg_len; in nfa_hciu_send_msg()
355 if (data_len != 0) { in nfa_hciu_send_msg()
356 memcpy(p_data, p_msg, data_len); in nfa_hciu_send_msg()
358 p_buf->len += data_len; in nfa_hciu_send_msg()
359 if (msg_len >= data_len) { in nfa_hciu_send_msg()
360 msg_len -= data_len; in nfa_hciu_send_msg()
361 p_msg += data_len; in nfa_hciu_send_msg()
Dnfa_hci_main.cc65 static void nfa_hci_assemble_msg(uint8_t* p_data, uint16_t data_len);
982 evt_data.registry.data_len = 0; in nfa_hci_rsp_timeout()
996 evt_data.registry.data_len = 0; in nfa_hci_rsp_timeout()
1099 static void nfa_hci_assemble_msg(uint8_t* p_data, uint16_t data_len) { in nfa_hci_assemble_msg() argument
1100 if ((nfa_hci_cb.msg_len + data_len) > nfa_hci_cb.max_msg_len) { in nfa_hci_assemble_msg()
1110 ((nfa_hci_cb.msg_len + data_len) - nfa_hci_cb.max_msg_len)); in nfa_hci_assemble_msg()
1112 memcpy(&nfa_hci_cb.p_msg_data[nfa_hci_cb.msg_len], p_data, data_len); in nfa_hci_assemble_msg()
1113 nfa_hci_cb.msg_len += data_len; in nfa_hci_assemble_msg()
/system/keymaster/km_openssl/
Dhmac.cpp53 bool HmacSha256::Sign(const uint8_t* data, size_t data_len, uint8_t* out_digest, in Sign() argument
61 if (nullptr == ::HMAC(EVP_sha256(), key_.get(), key_len_, data, data_len, digest, nullptr)) { in Sign()
74 bool HmacSha256::Verify(const uint8_t* data, size_t data_len, const uint8_t* digest, in Verify() argument
79 if (!Sign(data, data_len, computed_digest, sizeof(computed_digest))) return false; in Verify()
Dopenssl_utils.cpp123 size_t data_len; in EvpKeyToKeyMaterial() local
126 !CBB_finish(&cbb, &data, &data_len)) { in EvpKeyToKeyMaterial()
132 if (!key_blob->Reset(data_len)) { in EvpKeyToKeyMaterial()
136 memcpy(key_blob->writable_data(), data, data_len); in EvpKeyToKeyMaterial()
/system/nfc/src/include/
Dnfc_hal_api.h33 typedef void(tHAL_NFC_DATA_CBACK)(uint16_t data_len, uint8_t* p_data);
44 typedef void(tHAL_API_CORE_INITIALIZED)(uint16_t data_len,
46 typedef void(tHAL_API_WRITE)(uint16_t data_len, uint8_t* p_data);
DNfcAdaptation.h123 static void HalDeviceContextDataCallback(uint16_t data_len, uint8_t* p_data);
130 static void HalCoreInitialized(uint16_t data_len,
132 static void HalWrite(uint16_t data_len, uint8_t* p_data);
139 static void HalDownloadFirmwareDataCallback(uint16_t data_len,
Dhardware_nfc.h32 typedef void(nfc_stack_data_callback_t)(uint16_t data_len, uint8_t* p_data);
/system/keymaster/include/keymaster/km_openssl/
Dhmac.h41 bool Sign(const uint8_t* data, size_t data_len, uint8_t* digest, size_t digest_len) const;
50 bool Verify(const uint8_t* data, size_t data_len, const uint8_t* digest,
/system/authgraph/hal/src/
Dchannel.rs39 let data_len: u32 = data.len().try_into().map_err(|_e| { in write_msg() localVariable
45 let data_len_data = data_len.to_be_bytes(); in write_msg()
/system/keymaster/include/keymaster/
Dserializable.h90 uint8_t* append_to_buf(uint8_t* buf, const uint8_t* end, const void* data, size_t data_len);
118 size_t data_len) { in append_size_and_data_to_buf() argument
119 buf = append_uint32_to_buf(buf, end, data_len); in append_size_and_data_to_buf()
120 return append_to_buf(buf, end, data, data_len); in append_size_and_data_to_buf()
/system/nfc/src/nfa/dm/
Dnfa_dm_api.cc810 tNFA_STATUS NFA_SendRawFrame(uint8_t* p_raw_data, uint16_t data_len, in NFA_SendRawFrame() argument
816 LOG(VERBOSE) << StringPrintf("data_len:%d", data_len); in NFA_SendRawFrame()
819 if (((data_len == 0) || (p_raw_data == nullptr)) && in NFA_SendRawFrame()
824 size = NFC_HDR_SIZE + NCI_MSG_OFFSET_SIZE + NCI_DATA_HDR_SIZE + data_len; in NFA_SendRawFrame()
826 if (size < data_len) { in NFA_SendRawFrame()
835 p_msg->len = data_len; in NFA_SendRawFrame()
839 memcpy(p, p_raw_data, data_len); in NFA_SendRawFrame()
/system/libufdt/
Dufdt_convert.c353 int data_len = 0; in _ufdt_output_property_to_fdt() local
354 void *data = ufdt_node_get_fdt_prop_data(&prop_node->parent, &data_len); in _ufdt_output_property_to_fdt()
361 ((unsigned int)data_len + (FDT_TAGSIZE - 1u)) & ~(FDT_TAGSIZE - 1u); in _ufdt_output_property_to_fdt()
377 new_prop->len = cpu_to_fdt32(data_len); in _ufdt_output_property_to_fdt()
378 dto_memcpy(new_prop->data, data, data_len); in _ufdt_output_property_to_fdt()
/system/chre/apps/nearby/location/lbs/contexthub/nanoapps/nearby/crypto/
Daes.h94 size_t data_len);
/system/nfc/src/nfa/include/
Dnfa_hci_int.h454 extern void nfa_hci_handle_admin_gate_cmd(uint8_t* p_data, uint16_t data_len);
455 extern void nfa_hci_handle_admin_gate_rsp(uint8_t* p_data, uint8_t data_len);
458 uint16_t data_len);
460 uint16_t data_len);
/system/security/keystore2/test_utils/
Dffi_test_utils.cpp481 bool performSignData(const char* data, size_t data_len, EVP_PKEY* pkey, unsigned char** signature, in performSignData() argument
498 if (EVP_DigestSignUpdate(md_ctx, data, data_len) != 1) { in performSignData()
534 int performVerifySignature(const char* data, size_t data_len, EVP_PKEY* pkey, in performVerifySignature() argument
551 if (EVP_DigestVerifyUpdate(md_ctx, data, data_len) != 1) { in performVerifySignature()
592 size_t data_len = strlen(INPUT_DATA); in performCryptoOpUsingKeystoreEngine() local
593 if (!performSignData(INPUT_DATA, data_len, evp, &signature, &signature_len)) { in performCryptoOpUsingKeystoreEngine()
599 result = performVerifySignature(INPUT_DATA, data_len, evp, signature, signature_len); in performCryptoOpUsingKeystoreEngine()
/system/nfc/src/nfc/nfc/
Dnfc_ncif.cc1324 uint8_t data_len, ulen, tag, *p_data; in nfc_ncif_proc_ee_action() local
1342 data_len = *p++; in nfc_ncif_proc_ee_action()
1343 if (data_len > plen) data_len = (uint8_t)plen; in nfc_ncif_proc_ee_action()
1347 if (data_len > NFC_MAX_AID_LEN) data_len = NFC_MAX_AID_LEN; in nfc_ncif_proc_ee_action()
1348 evt_data.act_data.param.aid.len_aid = data_len; in nfc_ncif_proc_ee_action()
1349 STREAM_TO_ARRAY(evt_data.act_data.param.aid.aid, p, data_len); in nfc_ncif_proc_ee_action()
1358 while (data_len > NFC_TL_SIZE) { in nfc_ncif_proc_ee_action()
1359 data_len -= NFC_TL_SIZE; in nfc_ncif_proc_ee_action()
1362 if (ulen > data_len) ulen = data_len; in nfc_ncif_proc_ee_action()
1381 data_len -= ulen; in nfc_ncif_proc_ee_action()
/system/nfc/src/nfc/include/
Dce_api.h194 extern tNFC_STATUS CE_SendRawFrame(uint8_t* p_raw_data, uint16_t data_len);
/system/nfc/src/nfa/ee/
Dnfa_ee_api.cc878 tNFA_STATUS NFA_EeSendData(tNFA_HANDLE ee_handle, uint16_t data_len, in NFA_EeSendData() argument
895 (uint16_t)(sizeof(tNFA_EE_API_SEND_DATA) + data_len)); in NFA_EeSendData()
900 p_msg->data_len = data_len; in NFA_EeSendData()
902 memcpy(p_msg->p_data, p_data, data_len); in NFA_EeSendData()
/system/nfc/src/adaptation/
DNfcAdaptation.cc852 void NfcAdaptation::HalWrite(uint16_t data_len, uint8_t* p_data) { in HalWrite() argument
858 std::vector<uint8_t> aidl_data(p_data, p_data + data_len); in HalWrite()
862 data.setToExternal(p_data, data_len); in HalWrite()
876 void NfcAdaptation::HalCoreInitialized(uint16_t data_len, in HalCoreInitialized() argument
885 data.setToExternal(p_core_init_rsp_params, data_len); in HalCoreInitialized()
1045 uint16_t data_len, in HalDownloadFirmwareDataCallback() argument

12