/system/extras/ext4_utils/ |
sparse_crc32.c | 20 * do it this way? Because the calculated CRC must be transmitted in 22 * characters in order from LSB to MSB. By storing the CRC this way 33 * tions for all combinations of data and CRC register values 95 * A function that calculates the CRC-32 based on the table above is 104 u32 crc; local 106 crc = crc_in ^ ~0U; 108 crc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8); 109 return crc ^ ~0U [all...] |
make_ext4fs_main.c | 49 int crc = 0; local 93 crc = 1; 143 sparse, crc, wipe, init_itabs);
|
ext2simg.c | 39 fprintf(stderr, " -c include CRC block\n"); 173 int crc = 0; local 178 crc = 1; 225 write_ext4_image(out, gzip, sparse, crc, 0);
|
/external/flac/libFLAC/ |
crc.c | 36 #include "private/crc.h" 38 /* CRC-8, poly = x^8 + x^2 + x^1 + x^0, init = 0 */ 75 /* CRC-16, poly = x^16 + x^15 + x^2 + x^0, init = 0 */ 113 void FLAC__crc8_update(const FLAC__byte data, FLAC__uint8 *crc) 115 *crc = FLAC__crc8_table[*crc ^ data]; 118 void FLAC__crc8_update_block(const FLAC__byte *data, unsigned len, FLAC__uint8 *crc) 121 *crc = FLAC__crc8_table[*crc ^ *data++]; 126 FLAC__uint8 crc = 0 local 136 unsigned crc = 0; local [all...] |
ogg_helper.c | 98 FLAC__byte crc[4]; local 167 /* check the CRC */ 168 memcpy(crc, page->header+22, 4); 170 if(memcmp(crc, page->header+22, 4)) {
|
stream_encoder_framing.c | 39 #include "private/crc.h" 222 FLAC__byte crc; local 357 /* write the CRC */ 358 if(!FLAC__bitwriter_get_write_crc8(bw, &crc)) 360 if(!FLAC__bitwriter_write_raw_uint32(bw, crc, FLAC__FRAME_HEADER_CRC_LEN))
|
/external/webkit/Tools/DumpRenderTree/ |
CyclicRedundancyCheck.cpp | 59 unsigned crc = 0xffffffffL; local 61 crc = crcTable[(crc ^ buffer[i]) & 0xff] ^ ((crc >> 8) & 0x00ffffffL); 62 return crc ^ 0xffffffffL;
|
/external/jsilver/src/com/google/clearsilver/jsilver/functions/string/ |
CrcFunction.java | 28 * Returns the CRC-32 of a string. 34 * @return CRC-32 of string as number value 38 // This function produces a 'standard' CRC-32 (IV -1, reflected polynomial, 39 // and final complement step). The CRC-32 of "123456789" is 0xCBF43926. 40 Checksum crc = new CRC32(); local 47 crc.update(b, 0, b.length); 49 // CRC fits into 32 bits by definition. 50 return literalConstant((int) crc.getValue(), args[0]);
|
/libcore/luni/src/main/java/java/util/zip/ |
GZIPOutputStream.java | 47 protected CRC32 crc = new CRC32(); field in class:GZIPOutputStream 94 writeLong(crc.getValue()); 95 writeLong(crc.tbytes); 105 crc.update(buffer, off, nbytes);
|
GZIPInputStream.java | 64 protected CRC32 crc = new CRC32(); field in class:GZIPInputStream 106 crc.update(header, 0, header.length); 111 crc.update(header, 0, 2); 121 crc.update(buf, 0, result); 135 if ((short) crc.getValue() != crc16) { 136 throw new IOException("CRC mismatch"); 138 crc.reset(); 173 crc.update(buffer, offset, bytesRead); 186 final int trailerSize = 8; // crc (4 bytes) + total out (4 bytes) 193 if (Memory.peekInt(b, 0, ByteOrder.LITTLE_ENDIAN) != (int) crc.getValue()) [all...] |
CRC32.java | 28 private long crc = 0L; field in class:CRC32 38 return crc; 45 tbytes = crc = 0; 56 crc = updateByteImpl((byte) val, crc); 76 crc = updateImpl(buf, offset, byteCount, crc);
|
ZipOutputStream.java | 91 private final CRC32 crc = new CRC32(); field in class:ZipOutputStream 144 if (crc.getValue() != currentEntry.crc) { 145 throw new ZipException("CRC mismatch"); 147 if (currentEntry.size != crc.tbytes) { 157 writeLong(out, currentEntry.crc = crc.getValue()); 175 writeLong(cDir, crc.getValue()); 180 curOffset += writeLong(cDir, crc.tbytes); 181 writeLong(cDir, crc.tbytes) [all...] |
ZipInputStream.java | 89 private final CRC32 crc = new CRC32(); field in class:ZipInputStream 181 crc.reset(); 203 currentEntry.crc = ((long) Memory.peekInt(hdrBuf, EXTCRC, ByteOrder.LITTLE_ENDIAN)) & 0xffffffffL; 207 if (currentEntry.crc != crc.getValue()) { 208 throw new ZipException("CRC mismatch"); 322 crc.update(buffer, offset, toRead); 340 crc.update(buffer, offset, read);
|
/libcore/luni/src/test/java/libcore/java/util/zip/ |
OldAndroidChecksumTest.java | 56 CRC32 crc = new CRC32(); local 59 crc.update(values); 60 assertEquals(crc.getValue(), expected); 63 crc.reset(); 65 crc.update(values[i]); 67 assertEquals(crc.getValue(), expected);
|
/external/quake/quake/src/QW/client/ |
crc.c | 20 /* crc.c */ 23 #include "crc.h" 25 // this is a 16 bit, non-reflected CRC using the polynomial 0x1021 27 // CCITT standard CRC used by XMODEM 85 unsigned short crc; local 87 CRC_Init (&crc); 89 crc = (crc << 8) ^ crctable[(crc >> 8) ^ *start++];
91 return crc; [all...] |
/external/apache-harmony/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ |
CRC32Test.java | 28 CRC32 crc = new CRC32(); local 29 assertEquals("Constructor of CRC32 failed", 0, crc.getValue()); 37 CRC32 crc = new CRC32(); local 39 0, crc.getValue()); 41 crc.reset(); 42 crc.update(Integer.MAX_VALUE); 43 // System.out.print("value of crc " + crc.getValue()); 44 // Ran JDK and discovered that the value of the CRC should be 47 4278190080L, crc.getValue()) 75 CRC32 crc = new CRC32(); local 93 CRC32 crc = new CRC32(); local 124 CRC32 crc = new CRC32(); local 148 CRC32 crc = new CRC32(); local [all...] |
/external/e2fsprogs/e2fsck/ |
gen_crc32table.c | 27 * crc is the crc of the byte i; other entries are filled in based on the 34 uint32_t crc = 1; local 39 crc = (crc >> 1) ^ ((crc & 1) ? CRCPOLY_LE : 0); 41 crc32table_le[i + j] = crc ^ crc32table_le[j]; 51 uint32_t crc = 0x80000000; local 56 crc = (crc << 1) ^ ((crc & 0x80000000) ? CRCPOLY_BE : 0) [all...] |
/external/tcpdump/ |
print-mobile.c | 75 u_short proto,crc; local 87 crc = EXTRACT_16BITS(&mob->hcheck); 105 (void)printf(" (bad checksum %d)",crc);
|
/device/moto/stingray/whisper/ |
SHA_Comm.c | 33 /** \brief Calculates CRC 35 * \param[in] data pointer to data for which CRC should be calculated 41 uint16_t crc = 0x0000; local 49 cbit = (0x8000 & crc) ? 1 : 0; 50 crc <<= 1; 52 crc ^= poly; 56 crc = (crc << 8) | (crc >> 8); // flip byte order 59 return crc; [all...] |
/external/webkit/Source/WebCore/platform/graphics/android/ |
ImagesManager.cpp | 73 unsigned crc = 0; local 76 crc = ImageTexture::computeCRC(img); 80 if (m_images.contains(crc)) { 81 image = m_images.get(crc); 89 image = new ImageTexture(img, crc); 92 m_images.set(crc, image);
|
/packages/experimental/AndroidVendorSecurityTool/src/com/android/vending/sectool/v1/ |
BackendTest.java | 36 public static boolean crcMatches(File f, long crc) { 39 return getChecksum(f) == crc; 110 CRC32 crc = new CRC32(); local 113 crc.reset(); 115 crc.update(bytes, 0, byteCount); 118 long sum = crc.getValue(); 120 Log.d("AVST", "crc is --" + sum + "--");
|
/system/core/libzipfile/ |
zipfile.c | 82 unsigned long crc; local
|
/packages/apps/Browser/src/com/android/browser/ |
BrowserBackupAgent.java | 66 // Extract the previous bookmark file size & CRC from the saved state 93 long crc = -1; local 99 crc = copyBackupToFile(data, tmpfile, data.getDataSize()); 147 crc = -1; 157 writeBackupState(tmpfile.length(), crc, newState); local 191 CRC32 crc = new CRC32(); local 197 crc.update(buf, 0, numRead); 206 return crc.getValue(); 210 private void writeBackupState(long fileSize, long crc, ParcelFileDescriptor stateFile) 216 out.writeLong(crc); [all...] |
/bionic/libc/kernel/common/media/ |
ov5650.h | 48 __u16 crc; member in struct:ov5650_otp_data
|
/external/bluetooth/bluez/tools/ |
ubcsp.c | 50 static uint16 ubcsp_calc_crc (uint8 ch, uint16 crc);
70 /* The two version are for the CRC and non-CRC varients */
127 /* This is the storage required for building send and crc data */
216 /** Takes the next 8 bit value ch, and updates the crc with this value **/
223 static uint16 ubcsp_calc_crc (uint8 ch, uint16 crc)
225 /* Calculate the CRC using the above 16 entry lookup table */
237 crc = (crc >> 4) ^ crc_table[(crc ^ ch) & 0x000f]; 374 crc; local [all...] |