Home
last modified time | relevance | path

Searched refs:checksum (Results 1 – 25 of 32) sorted by relevance

12

/system/core/libnetutils/
Dchecksum.c35 uint32_t checksum = current; in ip_checksum_add() local
40 checksum += *data_16; in ip_checksum_add()
45 checksum += *(uint8_t*)data_16; in ip_checksum_add()
48 return checksum; in ip_checksum_add()
134 uint16_t ip_checksum_adjust(uint16_t checksum, uint32_t old_hdr_sum, uint32_t new_hdr_sum) { in ip_checksum_adjust() argument
137 checksum = ~checksum; in ip_checksum_adjust()
138 uint16_t folded_sum = ip_checksum_fold(checksum + new_hdr_sum); in ip_checksum_adjust()
Dpacket.c62 static uint32_t checksum(void *buffer, unsigned int count, uint32_t startsum) in checksum() function
108 ip.check = finish_sum(checksum(&ip, sizeof(ip), 0)); in send_packet()
116 udpsum = checksum(&ip.saddr, sizeof(ip.saddr), 0); in send_packet()
117 udpsum = checksum(&ip.daddr, sizeof(ip.daddr), udpsum); in send_packet()
119 udpsum = checksum(&temp, sizeof(temp), udpsum); in send_packet()
121 udpsum = checksum(&temp, sizeof(temp), udpsum); in send_packet()
124 udpsum = checksum(&udp, sizeof(udp), udpsum); in send_packet()
127 udpsum = checksum(msg, size, udpsum); in send_packet()
207 sum = finish_sum(checksum(&packet.ip, sizeof(packet.ip), 0)); in receive_packet()
242 sum = finish_sum(checksum(&packet, nread, 0)); in receive_packet()
DAndroid.bp9 "checksum.c",
30 "checksum.c",
/system/nfc/src/adaptation/
DCrcChecksum.cc99 uint16_t checksum = 0; in crcChecksumVerifyIntegrity() local
101 size_t actualReadCrc = read(fileStream, &checksum, sizeof(checksum)); in crcChecksumVerifyIntegrity()
111 if ((actualReadCrc == sizeof(checksum)) && (data.size() > 0)) { in crcChecksumVerifyIntegrity()
114 if (checksum == in crcChecksumVerifyIntegrity()
Dlibmain.cc91 uint16_t checksum = 0; in nfa_nv_co_read() local
92 size_t checkSumRdData = read(fileStream, &checksum, sizeof(checksum)); in nfa_nv_co_read()
143 uint16_t checksum = crcChecksumCompute(pBuffer, nbytes); in nfa_nv_co_write() local
144 size_t actualWrittenCrc = write(fileStream, &checksum, sizeof(checksum)); in nfa_nv_co_write()
149 (actualWrittenCrc == sizeof(checksum))) { in nfa_nv_co_write()
/system/keymaster/key_blob_utils/
Docb.c632 block checksum; /* Memory correct */ member
945 block offset, checksum; in ae_encrypt() local
953 ctx->ad_offset = ctx->checksum = zero_block(); in ae_encrypt()
965 checksum = ctx->checksum; in ae_encrypt()
976 checksum = xor_block(checksum, ptp[0]); in ae_encrypt()
979 checksum = xor_block(checksum, ptp[1]); in ae_encrypt()
982 checksum = xor_block(checksum, ptp[2]); in ae_encrypt()
986 checksum = xor_block(checksum, ptp[3]); in ae_encrypt()
990 checksum = xor_block(checksum, ptp[3]); in ae_encrypt()
993 checksum = xor_block(checksum, ptp[4]); in ae_encrypt()
[all …]
/system/bt/gd/packet/
Dbit_inserter_unittest.cc52 uint64_t checksum = 0x0123456789abcdef; in TEST() local
53 …(ByteObserver([&copy](uint8_t byte) { copy.push_back(byte); }, [checksum]() { return checksum; })); in TEST()
73 ASSERT_EQ(checksum, observer.GetValue()); in TEST()
Dfragmenting_inserter_unittest.cc65 uint64_t checksum = 0x0123456789abcdef; in TEST() local
66 …(ByteObserver([&copy](uint8_t byte) { copy.push_back(byte); }, [checksum]() { return checksum; })); in TEST()
91 ASSERT_EQ(checksum, observer.GetValue()); in TEST()
/system/bt/osi/test/
Dconfig_test.cc255 std::string checksum = "0x1234"; in TEST_F() local
258 EXPECT_EQ(base::WriteFile(file_path, checksum.data(), checksum.size()), in TEST_F()
259 (int)checksum.size()); in TEST_F()
261 EXPECT_EQ(checksum_read(filename.c_str()), checksum.c_str()); in TEST_F()
269 std::string checksum = "0x1234"; in TEST_F() local
272 EXPECT_TRUE(checksum_save(checksum, filename)); in TEST_F()
/system/core/fs_mgr/liblp/
Dreader.cpp94 memset(&temp.checksum, 0, sizeof(temp.checksum)); in ParseGeometry()
95 SHA256(&temp, temp.struct_size, temp.checksum); in ParseGeometry()
96 if (memcmp(temp.checksum, geometry->checksum, sizeof(temp.checksum)) != 0) { in ParseGeometry()
276 uint8_t checksum[32]; in ParseMetadata() local
277 SHA256(buffer.get(), header.tables_size, checksum); in ParseMetadata()
278 if (memcmp(checksum, header.tables_checksum, sizeof(checksum)) != 0) { in ParseMetadata()
Dwriter.cpp36 memset(geometry.checksum, 0, sizeof(geometry.checksum)); in SerializeGeometry()
37 SHA256(&geometry, sizeof(geometry), geometry.checksum); in SerializeGeometry()
/system/core/fastboot/fuzzy_fastboot/
Dextensions.cpp263 const tinyxml2::XMLElement* checksum = handle.ToElement(); in ExtractChecksum() local
264 if (checksum && checksum->Attribute("value")) { in ExtractChecksum()
265 config->checksum = XMLAttribute(checksum, "value"); in ExtractChecksum()
266 config->checksum_parser = XMLAttribute(checksum, "parser"); in ExtractChecksum()
267 if (XMLAssert(config->checksum_parser != "", checksum, in ExtractChecksum()
Dextensions.h125 std::string checksum; member
/system/core/libnetutils/include/netutils/
Dchecksum.h32 uint16_t ip_checksum_adjust(uint16_t checksum, uint32_t old_hdr_sum, uint32_t new_hdr_sum);
/system/core/fs_mgr/libvbmeta/
Dsuper_vbmeta_format_c.h101 uint8_t checksum[32]; member
Dbuilder.cpp148 memset(table_.header.checksum, 0, sizeof(table_.header.checksum)); in ExportVBMetaTable()
153 &table_.header.checksum[0]); in ExportVBMetaTable()
/system/core/adb/
Dtest_device.py706 def __init__(self, handle, checksum): argument
708 self.checksum = checksum
714 def __init__(self, checksum, full_path): argument
715 self.checksum = checksum
774 def _verify_remote(self, checksum, remote_path): argument
777 self.assertEqual(checksum, dev_md5)
779 def _verify_local(self, checksum, local_path): argument
782 self.assertEqual(host_md5, checksum)
819 self._verify_remote(temp_file.checksum, remote_path)
909 self._verify_remote(temp_file.checksum, remote_path)
[all …]
/system/nfc/src/nfc/tags/
Dce_t3t.cc205 uint16_t block_number, service_code, checksum, checksum_rx; in ce_t3t_handle_update_cmd() local
268 checksum = 0; in ce_t3t_handle_update_cmd()
270 checksum += p_temp[j]; in ce_t3t_handle_update_cmd()
274 if (checksum != checksum_rx) { in ce_t3t_handle_update_cmd()
378 uint16_t block_number, service_code, checksum; in ce_t3t_handle_check_cmd() local
451 checksum = 0; in ce_t3t_handle_check_cmd()
453 checksum += p_temp[j]; in ce_t3t_handle_check_cmd()
455 UINT16_TO_BE_STREAM(p_dst, checksum); in ce_t3t_handle_check_cmd()
/system/vold/
DCheckpoint.cpp411 uint32_t checksum; member
668 << le->checksum; in cp_restoreCheckpoint()
672 uint32_t checksum = le->source / (ls.block_size / kSectorSize); in cp_restoreCheckpoint() local
674 crc32(&buffer[i], ls.block_size, &checksum); in cp_restoreCheckpoint()
677 if (le->checksum && checksum != le->checksum) { in cp_restoreCheckpoint()
/system/bt/gd/packet/parser/
DREADME16 checksum MyChecksumClass : 16 "path/to/the/class/"
20 // Assuming a 16-bit (uint16_t) checksum:
Dlanguage_l.ll62 "checksum" { return(token::CHECKSUM); }
/system/bt/osi/src/
Dconfig.cc378 bool checksum_save(const std::string& checksum, const std::string& filename) { in checksum_save() argument
379 CHECK(!checksum.empty()) << __func__ << ": checksum cannot be empty"; in checksum_save()
414 if (base::WriteFile(path, checksum.data(), checksum.size()) != in checksum_save()
415 (int)checksum.size()) { in checksum_save()
/system/core/fs_mgr/liblp/include/liblp/
Dmetadata_format.h124 uint8_t checksum[32]; member
/system/bt/osi/include/
Dconfig.h148 bool checksum_save(const std::string& checksum, const std::string& filename);
/system/bt/gd/packet/parser/test/
Dbig_endian_test_packets.pdl71 checksum SimpleSum : 16 "packet/parser/test/"

12