Home
last modified time | relevance | path

Searched full:checksum (Results 1 – 25 of 825) sorted by relevance

12345678910>>...33

/external/android-clat/
Dchecksum.c16 * checksum.c - ipv4/ipv6 checksum calculation
27 #include "checksum.h"
30 * adds data to a checksum
31 * current - the current checksum (or 0 to start a new checksum)
32 * data - the data to add to the checksum
36 uint32_t checksum = current; in ip_checksum_add() local
41 checksum += *data_16; in ip_checksum_add()
46 checksum += *(uint8_t *)data_16; in ip_checksum_add()
49 return checksum; in ip_checksum_add()
53 * folds a 32-bit partial checksum into 16 bits
[all …]
Dtranslate.c23 #include "checksum.h"
30 * calculates the checksum over all the packet components starting from pos
31 * checksum - checksum of packet components before pos
32 * packet - packet to calculate the checksum of
34 * returns - the completed 16-bit checksum, ready to write into a checksum header field
36 uint16_t packet_checksum(uint32_t checksum, clat_packet packet, clat_packet_index pos) { in packet_checksum() argument
40 checksum = ip_checksum_add(checksum, packet[i].iov_base, packet[i].iov_len); in packet_checksum()
43 return ip_checksum_finish(checksum); in packet_checksum()
222 * checksum - pseudo-header checksum
228 uint32_t checksum, const uint8_t *payload, size_t payload_size) { in icmp_to_icmp6() argument
[all …]
Dipv4.c21 #include "checksum.h"
30 * checksum - pseudo-header checksum
35 uint32_t checksum, size_t len) { in icmp_packet() argument
47 return icmp_to_icmp6(out, pos, icmp, checksum, payload, payload_size); in icmp_packet()
103 * UDP include parts of the IP header in the checksum. Set the length to zero because we don't in ipv4_packet()
109 /* Calculate the pseudo-header checksum. in ipv4_packet()
110 * Technically, the length that is used in the pseudo-header checksum is the transport layer in ipv4_packet()
112 * translation does not change the transport layer length, the checksum is unaffected. in ipv4_packet()
/external/chromium_org/net/tools/testserver/
Decho_message.py7 This program has classes and functions to encode, decode, calculate checksum
14 <version><checksum><payload_size><payload>. <version> is the version number
15 of the "echo request" protocol. <checksum> is the checksum of the <payload>.
19 <version><checksum><payload_size><key><encoded_payload>.<version>,
20 <checksum> and <payload_size> are same as what is in the "echo request" message.
36 This class knows how to parse the checksum, payload_size from the
37 "echo request" and "echo response" messages. It holds the checksum,
44 # This specifies the starting position of the checksum and length of the
45 # checksum. Maximum value for the checksum is less than (2 ** 31 - 1).
59 def __init__(self, checksum=0, payload_size=0): argument
[all …]
/external/zlib/src/contrib/dotzlib/DotZLib/
DChecksumImpl.cs23 /// The value of the current checksum
28 /// Initializes a new instance of the checksum generator base - the current checksum is
37 /// Initializes a new instance of the checksum generator basewith a specified value
39 /// <param name="initialValue">The value to set the current checksum to</param>
46 /// Resets the current checksum to zero
51 /// Gets the current checksum value
56 /// Updates the current checksum with part of an array of bytes
58 /// <param name="data">The data to update the checksum with</param>
69 /// Updates the current checksum with an array of bytes.
71 /// <param name="data">The data to update the checksum with</param>
[all …]
/external/chromium_org/native_client_sdk/src/build_tools/json/
Dnaclsdk_manifest2.json6 "checksum": { object
39 "checksum": { object
47 "checksum": { object
55 "checksum": { object
63 "checksum": { object
82 "checksum": { object
90 "checksum": { object
98 "checksum": { object
106 "checksum": { object
125 "checksum": { object
[all …]
Dnaclsdk_manifest.json12 "checksum": { object
20 "checksum": { object
28 "checksum": { object
46 "checksum": { object
64 "checksum": { object
72 "checksum": { object
80 "checksum": { object
98 "checksum": { object
106 "checksum": { object
114 "checksum": { object
[all …]
/external/chromium_org/chrome/browser/chromeos/login/
Dhwid_checker.cc31 char checksum[5]; in CalculateHWIDv2Checksum() local
33 snprintf(checksum, 5, "%04u", crc32 % 10000); in CalculateHWIDv2Checksum()
35 return checksum; in CalculateHWIDv2Checksum()
40 std::string checksum; in IsCorrectHWIDv2() local
41 if (!RE2::FullMatch(hwid, "([\\s\\S]*) (\\d{4})", &body, &checksum)) in IsCorrectHWIDv2()
43 return CalculateHWIDv2Checksum(body) == checksum; in IsCorrectHWIDv2()
55 std::string checksum; in CalculateExceptionalHWIDChecksum() local
56 checksum += base32_alphabet[(crc32 >> 5) & 0x1f]; in CalculateExceptionalHWIDChecksum()
57 checksum += base32_alphabet[crc32 & 0x1f]; in CalculateExceptionalHWIDChecksum()
58 return checksum; in CalculateExceptionalHWIDChecksum()
[all …]
/external/stressapptest/src/
Dadler32memcpy.h21 // Encapsulation for Adler checksum. Please see adler32memcpy.cc for more
22 // detail on the adler checksum algorithm.
29 // Returns string representation of the Adler checksum
31 // Sets components of the Adler checksum.
35 // Components of Adler checksum.
41 // Calculates Adler checksum for supplied data.
43 AdlerChecksum *checksum);
47 unsigned int size_in_bytes, AdlerChecksum *checksum);
52 unsigned int size_in_bytes, AdlerChecksum *checksum);
56 unsigned int size_in_bytes, AdlerChecksum *checksum);
Dadler32memcpy.cc17 // We are using (a modified form of) adler-32 checksum algorithm instead
22 // checksums are done (we could have one checksum but two checksums
32 // checksum = a<<16 + b
70 // Returns string representation of the Adler checksum.
77 // Sets components of the Adler checksum.
85 // Calculates Adler checksum for supplied data.
87 AdlerChecksum *checksum) { in CalculateAdlerChecksum() argument
119 checksum->Set(a1, a2, b1, b2); in CalculateAdlerChecksum()
125 unsigned int size_in_bytes, AdlerChecksum *checksum) { in AdlerMemcpyC() argument
159 checksum->Set(a1, a2, b1, b2); in AdlerMemcpyC()
[all …]
/external/chromium_org/third_party/libaddressinput/src/cpp/test/
Dvalidating_util_test.cc28 #define CHECKSUM "dd63dafcbd4d5b28badfcaf86fb6fcdb" macro
40 // The checksum and data together.
41 const char kChecksummedData[] = "checksum=" CHECKSUM "\n"
44 // "Randomly" corrupted checksummed data. The "m" in "checksum" is capitalized.
45 const char kCorruptedChecksummedData[] = "checksuM=" CHECKSUM "\n"
48 // The checksum in the middle of data.
50 "checksum=" CHECKSUM "\n"
55 "checksum=" CHECKSUM "\n"
60 "checksum=" CHECKSUM "\n"
/external/chromium_org/base/metrics/
Dbucket_ranges_unittest.cc20 EXPECT_EQ(0u, ranges.checksum()); in TEST()
48 // Checksum does not match. in TEST()
58 TEST(BucketRangesTest, Checksum) { in TEST() argument
65 EXPECT_EQ(289217253u, ranges.checksum()); in TEST()
71 EXPECT_EQ(2843835776u, ranges.checksum()); in TEST()
79 uint32 checksum = i; in TEST() local
82 if (checksum & 1) in TEST()
83 checksum = kReversedPolynomial ^ (checksum >> 1); in TEST()
85 checksum >>= 1; in TEST()
87 EXPECT_EQ(kCrcTable[i], checksum); in TEST()
/external/qemu-pc-bios/bochs/bios/
Dbiossums.c128 printf( "Current checksum: 0x%02X\n", cur_val ); in main()
129 printf( "Calculated checksum: 0x%02X ", new_val ); in main()
133 printf( "Setting checksum." ); in main()
137 printf( "Multiple PCI headers! No checksum set." ); in main()
151 printf( "Current checksum: 0x%02X\n", cur_val ); in main()
152 printf( "Calculated checksum: 0x%02X ", new_val ); in main()
156 printf( "Setting checksum." ); in main()
160 printf( "Warning! Multiple MP headers. No checksum set." ); in main()
174 printf( "Current checksum: 0x%02X\n", cur_val ); in main()
175 printf( "Calculated checksum: 0x%02X ", new_val ); in main()
[all …]
/external/tcpdump/
Din_cksum.c2 * 4.4-Lite-2 Internet checksum routine, modified to take a vector of
47 * Checksum routine for Internet Protocol family headers (Portable Version).
151 * Given the host-byte-order value of the checksum field in a packet
152 * header, and the network-byte-order computed checksum of the data
153 * that the checksum covers (including the checksum itself), compute
154 * what the checksum field *should* have been.
162 * The value that should have gone into the checksum field in in_cksum_shouldbe()
164 * *but* the checksum field. in in_cksum_shouldbe()
166 * We can compute that by subtracting the value of the checksum in in_cksum_shouldbe()
170 * "sum" is the value of the checksum field, and "computed_sum" in in_cksum_shouldbe()
[all …]
/external/genext2fs/
Dtest.sh19 checksum=$1
21 if [ x$md5 = x$checksum ] ; then
31 # Usage: dtest file-size number-of-blocks correct-checksum
33 size=$1; blocks=$2; checksum=$3
36 md5cmp $checksum
43 # Usage: ftest spec-file number-of-blocks correct-checksum
45 fname=$1; blocks=$2; checksum=$3
48 md5cmp $checksum
/external/iptables/extensions/
Dlibxt_CHECKSUM.c1 /* Shared library add-on to xtables for CHECKSUM
22 "CHECKSUM target options\n" in CHECKSUM_help()
23 " --checksum-fill Fill in packet checksum.\n"); in CHECKSUM_help()
27 {.name = "checksum-fill", .id = O_CHECKSUM_FILL,
46 printf(" CHECKSUM"); in CHECKSUM_print()
58 printf(" --checksum-fill"); in CHECKSUM_save()
62 .name = "CHECKSUM",
Dlibxt_CHECKSUM.man4 \fB\-\-checksum\-fill\fP
5 Compute and fill in the checksum in a packet that lacks a checksum.
7 such as dhcp clients, that do not work well with checksum offloads,
8 but don't want to disable checksum offload in your device.
/external/chromium_org/third_party/brotli/src/woff2/
Dnormalize.cc138 uint32_t checksum = 0; in ComputeChecksum() local
140 checksum += ((buf[i] << 24) | in ComputeChecksum()
145 return checksum; in ComputeChecksum()
149 uint32_t checksum = font.flavor; in ComputeHeaderChecksum() local
153 checksum += (font.num_tables << 16 | search_range); in ComputeHeaderChecksum()
154 checksum += (max_pow2 << 16 | range_shift); in ComputeHeaderChecksum()
156 checksum += i.second.tag; in ComputeHeaderChecksum()
157 checksum += i.second.checksum; in ComputeHeaderChecksum()
158 checksum += i.second.offset; in ComputeHeaderChecksum()
159 checksum += i.second.length; in ComputeHeaderChecksum()
[all …]
/external/chromium_org/chrome/browser/nacl_host/test/
Dgdb_rsp.py13 checksum = 0
15 checksum = (checksum + ord(char)) % 0x100
16 return checksum
59 checksum = match.group(2)
61 if checksum != expected_checksum:
62 raise AssertionError('Bad RSP checksum: %r != %r' %
63 (checksum, expected_checksum))
/external/fonttools/Lib/fontTools/ttLib/
Dsfnt.py80 checksum = calcChecksum(data[:8] + b'\0\0\0\0' + data[12:])
82 checksum = calcChecksum(data)
85 assert checksum == entry.checksum, "bad checksum for '%s' table" % tag
86 elif checksum != entry.checkSum:
88 print("bad checksum for '%s' table" % tag)
146 entry.checkSum = calcChecksum(data[:8] + b'\0\0\0\0' + data[12:])
150 entry.checkSum = calcChecksum(data)
240 checksums.append(self.tables[tags[i]].checkSum)
242 # TODO(behdad) I'm fairly sure the checksum for woff is not working correctly.
245 # Create a SFNT directory for checksum calculation purposes
[all …]
/external/chromium_org/third_party/libaddressinput/src/cpp/src/
Dvalidating_util.cc15 // ValidatingUtil wraps data with checksum and timestamp. Format:
18 // checksum=<checksum>
26 // The checksum is the 32-character hexadecimal MD5 checksum of <data>. It is
48 const char kChecksumPrefix[] = "checksum=";
133 std::string checksum; in UnwrapChecksum() local
134 if (!UnwrapHeader(kChecksumPrefix, kChecksumPrefixLength, data, &checksum)) { in UnwrapChecksum()
137 return checksum == MD5String(*data); in UnwrapChecksum()
/external/chromium_org/chrome/browser/net/
Dprobe_message.cc35 DVLOG(2) << "version " << header.version() << " checksum " in ParseInput()
36 << header.checksum() << " type " << header.type(); in ParseInput()
43 // Checksum is computed on padding only. in ParseInput()
46 uint32 computed_checksum = Checksum(probe_packet->padding()); in ParseInput()
47 if (computed_checksum != header.checksum()) { in ParseInput()
48 DVLOG(1) << "Checksum mismatch. Got: " << header.checksum() in ParseInput()
62 uint32 ProbeMessage::Checksum(const std::string& str) const { in Checksum() function in chrome_browser_net::ProbeMessage
91 probe_packet->mutable_header()->set_checksum(Checksum(*padding)); in GenerateProbeRequest()
/external/chromium_org/third_party/lcov/man/
Dlcov.125 .RB [ \-\-checksum ]
26 .RB [ \-\-no\-checksum ]
91 .RB [ \-\-checksum ]
92 .RB [ \-\-no\-checksum ]
109 .RB [ \-\-checksum ]
110 .RB [ \-\-no\-checksum ]
127 .RB [ \-\-checksum ]
128 .RB [ \-\-no\-checksum ]
145 .RB [ \-\-checksum ]
146 .RB [ \-\-no\-checksum ]
[all …]
Dgeninfo.122 .RB [ \-\-checksum ]
23 .RB [ \-\-no\-checksum ]
133 .B \-\-checksum
135 .B \-\-no\-checksum
138 Specify whether to generate checksum data when writing tracefiles.
140 Use \-\-checksum to enable checksum generation or \-\-no\-checksum to
141 disable it. Checksum generation is
145 When checksum generation is enabled, a checksum will be generated for each
146 source code line and stored along with the coverage data. This checksum will
473 DA:<line number>,<execution count>[,<checksum>]
[all …]
/external/chromium_org/third_party/libaddressinput/chromium/cpp/src/
Dretriever.cc51 // The prefix for the checksum line in the footer.
52 const char kChecksumPrefix[] = "checksum=";
57 // Returns |data| with attached checksum and current timestamp. Format:
60 // checksum=<checksum>
68 // The checksum is the 32-character hexadecimal MD5 checksum of <data>. It is
111 // Strips out the timestamp and checksum from |data_and_footer|. Validates the
112 // checksum. Saves the footer-less data into |data|. Compares the parsed
118 // correct checksum.
142 std::string checksum; in VerifyAndExtractTimestamp() local
144 kChecksumPrefix, &checksum, data)) { in VerifyAndExtractTimestamp()
[all …]

12345678910>>...33