| /external/android-clat/ |
| D | checksum.c | 16 * checksum.c - ipv4/ipv6 checksum calculation 26 #include "checksum.h" 29 * adds data to a checksum 30 * current - the current checksum (or 0 to start a new checksum) 31 * data - the data to add to the checksum 35 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() 52 * folds a 32-bit partial checksum into 16 bits [all …]
|
| D | translate.c | 22 #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 …]
|
| D | clatd_test.cpp | 29 #include "checksum.h" 47 55, (p), (c1), (c2), /* TTL=55, protocol=p, checksum=c1,c2 */ \ 70 0x00, UDP_LEN, 0, 0, /* Length 21, checksum empty for now */ 75 0x08, 0x00, 0x88, 0xd0, /* Type 8, code 0, checksum 0x88d0 */ \ 79 0x80, 0x00, 0xc3, 0x42, /* Type 128, code 0, checksum 0xc342 */ \ 213 EXPECT_EQ(0, ip_checksum(ip, sizeof(*ip))) << msg << ": Incorrect IP checksum\n"; in check_packet() 257 // If we understand the payload, verify the checksum. in check_packet() 259 uint16_t checksum; in check_packet() local 264 checksum = ip_checksum_finish(ip_checksum_add(pseudo_checksum, payload, payload_length)); in check_packet() 267 checksum = ip_checksum(payload, payload_length); in check_packet() [all …]
|
| D | ipv4.c | 21 #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()
|
| D | ipv6.c | 23 #include "checksum.h" 33 * checksum - pseudo-header checksum (unused) 119 * UDP include parts of the IP header in the checksum. Set the length to zero because we don't in ipv6_packet() 126 // Do this before calculating the pseudo-header checksum because it updates the next header value. in ipv6_packet() 146 /* Calculate the pseudo-header checksum. in ipv6_packet() 147 * Technically, the length that is used in the pseudo-header checksum is the transport layer in ipv6_packet() 149 * translation does not change the transport layer length, the checksum is unaffected. in ipv6_packet() 175 // Set the length and calculate the checksum. in ipv6_packet()
|
| /external/zlib/src/contrib/dotzlib/DotZLib/ |
| D | ChecksumImpl.cs | 23 /// 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 …]
|
| D | DotZLib.cs | 112 /// Declares methods and properties that enables a running checksum to be calculated 117 /// Gets the current value of the checksum 122 /// Clears the current checksum to 0 127 /// Updates the current checksum with an array of bytes 129 /// <param name="data">The data to update the checksum with</param> 133 /// Updates the current checksum with part of an array of bytes 135 /// <param name="data">The data to update the checksum with</param> 144 /// Updates the current checksum with the data from a string 146 /// <param name="data">The string to update the checksum with</param> 151 /// Updates the current checksum with the data from a string, using a specific encoding [all …]
|
| /external/guava/guava/src/com/google/common/hash/ |
| D | ChecksumHashFunction.java | 23 import java.util.zip.Checksum; 26 * {@link HashFunction} adapter for {@link Checksum} instances. 32 private final Supplier<? extends Checksum> checksumSupplier; 36 ChecksumHashFunction(Supplier<? extends Checksum> checksumSupplier, int bits, String toString) { in ChecksumHashFunction() 59 * Hasher that updates a checksum. 63 private final Checksum checksum; field in ChecksumHashFunction.ChecksumHasher 65 private ChecksumHasher(Checksum checksum) { in ChecksumHasher() argument 66 this.checksum = checkNotNull(checksum); in ChecksumHasher() 71 checksum.update(b); in update() 76 checksum.update(bytes, off, len); in update() [all …]
|
| /external/llvm/test/Object/Inputs/COFF/ |
| D | section-aux-symbol.yaml | 21 CheckSum: 0 33 CheckSum: 0 45 CheckSum: 0 57 CheckSum: 0 69 CheckSum: 0 81 CheckSum: 0 93 CheckSum: 0 105 CheckSum: 0 117 CheckSum: 0 129 CheckSum: 0 [all …]
|
| /external/deqp/scripts/khr_util/ |
| D | registry_cache.py | 32 def __init__(self, filename, revision, checksum): argument 35 self.checksum = checksum 38 return hash((self.filename, self.revision, self.checksum)) 41 …return (self.filename, self.revision, self.checksum) == (other.filename, other.revision, other.che… 50 return self.checksum 66 def fetchFile (dstPath, url, checksum): argument 79 if checksum != gotChecksum: 80 raise Exception("Checksum mismatch, exepected %s, got %s" % (checksum, gotChecksum)) 84 def checkFile (filename, checksum): argument 92 return computeChecksum(readFile(filename)) == checksum [all …]
|
| /external/tcpdump/ |
| D | in_cksum.c | 2 * 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/iptables/extensions/ |
| D | libxt_CHECKSUM.c | 1 /* 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",
|
| D | libxt_CHECKSUM.man | 4 \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/guava/guava-tests/benchmark/com/google/common/hash/ |
| D | ChecksumBenchmark.java | 26 import java.util.zip.Checksum; 29 * Benchmarks for comparing {@link Checksum}s and {@link HashFunction}s that wrap {@link Checksum}s. 60 CRC32 checksum = new CRC32(); in crc32Checksum() local 61 checksum.update(testBytes); in crc32Checksum() 62 result ^= checksum.getValue(); in crc32Checksum() 76 Adler32 checksum = new Adler32(); in adler32Checksum() local 77 checksum.update(testBytes); in adler32Checksum() 78 result ^= checksum.getValue(); in adler32Checksum()
|
| /external/fonttools/Lib/fontTools/ttLib/ |
| D | sfnt.py | 80 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/deqp/external/ |
| D | fetch_sources.py | 14 def __init__(self, url, filename, checksum, dstDir, postExtract=None): argument 17 self.checksum = checksum 43 checksum = computeChecksum(data) 46 if checksum != pkg.checksum: 47 …raise Exception("Checksum mismatch for %s, exepected %s, got %s" % (pkg.filename, pkg.checksum, ch…
|
| /external/squashfs-tools/squashfs-tools/ |
| D | process_fragments.c | 58 * Compute 16 bit BSD checksum over the data, and check for sparseness 75 file_buffer->checksum = chksum; in checksum_sparse() 220 char *data_buffer, int fd, unsigned short *checksum) in get_fragment_cksum() argument 237 *checksum = cksum; in get_fragment_cksum() 279 unsigned short checksum; in frag_thrd() local 325 checksum = dupl_ptr->fragment_checksum; in frag_thrd() 329 * If we have the checksum and it matches then in frag_thrd() 332 * If we *don't* have the checksum, then we are in frag_thrd() 334 * "old" filesystem. Read it in and checksum in frag_thrd() 339 data_buffer, fd, &checksum); in frag_thrd() [all …]
|
| /external/guava/guava-tests/test/com/google/common/hash/ |
| D | ChecksumHashFunctionTest.java | 24 import java.util.zip.Checksum; 67 private static void assertChecksum(Supplier<Checksum> supplier, String input) { in assertChecksum() 70 Checksum checksum = supplier.get(); in assertChecksum() local 71 checksum.update(bytes, 0, bytes.length); in assertChecksum() 72 long value = checksum.getValue(); in assertChecksum() 80 private static void assertHash32(int expected, Supplier<Checksum> supplier, String input) { in assertHash32()
|
| /external/sfntly/cpp/src/sfntly/table/ |
| D | header.h | 33 Header(int32_t tag, int64_t checksum, int32_t offset, int32_t length); 61 // Get the checksum for the table as recorded in the table record header. 62 int64_t checksum() { return checksum_; } in checksum() function 64 // Is the checksum valid. The checksum will not be valid if the table was 66 // Note that this does *NOT* check the validity of the checksum against 67 // the calculated checksum for the table data.
|
| /external/zopfli/src/zopfli/ |
| D | zlib_container.c | 28 /* Calculates the adler32 checksum of the data */ 54 unsigned checksum = adler32(in, (unsigned)insize); in ZopfliZlibCompress() local 68 ZOPFLI_APPEND_DATA((checksum >> 24) % 256, out, outsize); in ZopfliZlibCompress() 69 ZOPFLI_APPEND_DATA((checksum >> 16) % 256, out, outsize); in ZopfliZlibCompress() 70 ZOPFLI_APPEND_DATA((checksum >> 8) % 256, out, outsize); in ZopfliZlibCompress() 71 ZOPFLI_APPEND_DATA(checksum % 256, out, outsize); in ZopfliZlibCompress()
|
| /external/e2fsprogs/lib/ext2fs/ |
| D | csum.c | 49 /* Have to swab back to little-endian to do the checksum */ in ext2fs_group_desc_csum() 63 offset += sizeof(desc->bg_checksum); /* skip checksum */ in ext2fs_group_desc_csum() 64 /* for checksum of struct ext4_group_desc do the rest...*/ in ext2fs_group_desc_csum() 73 * descriptor, checksum the rest of the descriptor here in ext2fs_group_desc_csum() 102 /* ext2fs_bg_checksum_set() sets the actual checksum field but in ext2fs_group_desc_csum_set() 103 * does not calculate the checksum itself. */ in ext2fs_group_desc_csum_set() 189 /* Have to swab back to little-endian to do the checksum */ in print_csum() 204 offset += sizeof(desc->bg_checksum); /* skip checksum */ in print_csum() 205 /* for checksum of struct ext4_group_desc do the rest...*/ in print_csum() 262 printf("checksum for group 0 should be %04x\n", csum_known); in main() [all …]
|
| D | ext2_err.et.in | 450 "Inode checksum does not match inode" 453 "Inode bitmap checksum does not match bitmap" 456 "Extent block checksum does not match extent block" 459 "Directory block does not have space for checksum" 462 "Directory block checksum does not match directory block" 465 "Extended attribute block checksum does not match block" 468 "Superblock checksum does not match superblock" 471 "Unknown checksum algorithm" 474 "MMP block checksum does not match MMP block"
|
| D | ext2_err.c | 157 N_( "Inode checksum does not match inode"), 158 N_( "Inode bitmap checksum does not match bitmap"), 159 N_( "Extent block checksum does not match extent block"), 160 N_( "Directory block does not have space for checksum"), 161 N_( "Directory block checksum does not match directory block"), 162 N_( "Extended attribute block checksum does not match block"), 163 N_( "Superblock checksum does not match superblock"), 164 N_( "Unknown checksum algorithm"), 165 N_( "MMP block checksum does not match MMP block"),
|
| /external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/engines/ |
| D | DESedeWrapEngine.java | 55 // checksum digest 151 // Compute the CMS Key Checksum, (section 5.6.1), call this CKS. in wrap() 292 // Calculate a CMS Key Checksum, (section 5.6.1), over the WK and compare in unwrap() 297 "Checksum inside ciphertext is corrupted"); in unwrap() 305 * Some key wrap algorithms make use of the Key Checksum defined 310 * - Use the first 8 octets of this hash as the checksum value. 315 * @return the CMS checksum. 335 * @param checksum the checksum. 340 byte[] checksum) in checkCMSKeyChecksum() argument 342 return Arrays.constantTimeAreEqual(calculateCMSKeyChecksum(key), checksum); in checkCMSKeyChecksum()
|
| /external/libnfc-nci/src/adaptation/ |
| D | CrcChecksum.cpp | 69 ** Description Compute a checksum on a buffer of data. 71 ** Returns 2-byte checksum. 92 ** Description Detect any corruption in a file by computing a checksum. 105 unsigned short checksum = 0; in crcChecksumVerifyIntegrity() local 107 size_t actualReadCrc = read (fileStream, &checksum, sizeof(checksum)); in crcChecksumVerifyIntegrity() 118 if ((actualReadCrc == sizeof(checksum)) && (data.size() > 0)) in crcChecksumVerifyIntegrity() 121 if (checksum == crcChecksumCompute ((const unsigned char*) data.data(), data.size())) in crcChecksumVerifyIntegrity() 124 ALOGE ("%s: checksum mismatch", __FUNCTION__); in crcChecksumVerifyIntegrity()
|