Searched refs:crc (Results 26 - 50 of 86) sorted by relevance

1234

/haiku-fatelf/src/add-ons/kernel/file_systems/ext2/
H A DCRCTable.cpp50 /*! \brief Calculates the EXT4 crc checksum for the given byte stream.
52 Based on crc code from UDF-2.50 6.5, as permitted.
58 \return The crc checksum, or 0 if an error occurred.
61 calculate_crc(uint16 crc, uint8 *data, uint16 length) argument
65 crc = kCrcTable[(crc ^ *data) & 0xff] ^ (crc >> 8);
67 return crc;
/haiku-fatelf/src/add-ons/kernel/file_systems/udf/
H A DUtils.cpp24 /*! \brief Calculates the UDF crc checksum for the given byte stream.
26 Based on crc code from UDF-2.50 6.5, as permitted.
31 \return The crc checksum, or 0 if an error occurred.
36 uint16 crc = 0; local
39 crc = kCrcTable[(crc >> 8 ^ *data) & 0xff] ^ (crc << 8);
41 return crc;
/haiku-fatelf/src/add-ons/kernel/partitioning_systems/gpt/
H A Dcrc32.cpp101 uint32 crc = ~0U; local
103 crc = kTab[(crc ^ *buffer++) & 0xff] ^ (crc >> 8);
104 return crc ^ ~0U;
/haiku-fatelf/src/libs/pdflib/libs/flate/
H A Dcrc32.c48 /* terms of polynomial defining this crc (except x^32): */
137 #define DO1(buf) crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8);
144 uLong crc,
153 crc = crc ^ 0xffffffffL;
162 return crc ^ 0xffffffffL;
143 crc32( uLong crc, const Bytef *buf, uInt len) argument
/haiku-fatelf/src/bin/fwcontrol/
H A Dfwcrom.c247 uint32_t data, sum, crc = 0; local
252 sum = ((crc >> 12) ^ (data >> shift)) & 0xf;
253 crc = (crc << 4) ^ (sum << 12) ^ (sum << 5) ^ sum;
255 crc &= 0xffff;
257 return((uint16_t) crc);
320 uint16_t crc; local
341 crc = crom_crc((uint32_t *)&dir->entry[0], dir->crc_len);
342 len -= snprintf(buf, len, "len=%d crc=0x%04x(%s) ",
343 dir->crc_len, dir->crc,
[all...]
H A Dfwcontrol.c443 u_int16_t crc; local
457 printf("info_len=%d crc_len=%d crc=0x%04x",
458 hdr->info_len, hdr->crc_len, hdr->crc);
459 crc = crom_crc(crom_buf+1, hdr->crc_len);
460 if (crc == hdr->crc)
472 printf("root_directory: len=0x%04x(%d) crc=0x%04x",
473 dir->crc_len, dir->crc_len, dir->crc);
474 crc = crom_crc((u_int32_t *)&dir->entry[0], dir->crc_len);
475 if (crc
[all...]
/haiku-fatelf/src/bin/zip/
H A Dzipup.c150 local ulg crc; /* crc on uncompressed file data */ variable
480 * crc are not yet known.
496 z->crc = 0; /* to be updated later */
502 /* Since we do not yet know the crc here, we pretend that the crc
505 z->crc = z->tim << 16;
533 crypthead(key, z->crc, y);
556 crc = CRCVAL_INITIAL;
575 * compute crc firs
1134 ulg crc; local
[all...]
H A Dcrypt.c171 * and the cyclic redundancy check crc.
173 void crypthead(passwd, crc, zfile)
175 ulg crc; /* crc of file being encrypted */
197 /* Encrypt random header (last two bytes is high word of crc) */
203 ztemp = zencode((int)(crc >> 16) & 0xff, t);
205 ztemp = zencode((int)(crc >> 24) & 0xff, t);
239 crypthead(passwd, z->crc, dest);
310 /* If last two bytes of header don't match crc (or file time in the
316 (z->flg & 8 ? (ush) z->tim & 0xffff : (ush)(z->crc >> 1
[all...]
H A Dzipfile.c59 #define LOCCRC 10 /* uncompressed crc-32 for file */
65 #define EXTCRC 0 /* uncompressed crc-32 for file */
75 #define CENCRC 12 /* uncompressed crc-32 for file */
430 z->crc = LG(LOCCRC + b);
519 z->crc = LG(4 + EXTCRC + b);
899 z->crc = LG((CENCRC-CENVER) + u);
1100 PUTLG(z->crc, f);
1118 PUTLG(z->crc, f);
1136 PUTLG(z->crc, f);
/haiku-fatelf/src/bin/unzip/
H A Dcrypt.c170 * and the cyclic redundancy check crc.
172 void crypthead(passwd, crc, zfile)
174 ulg crc; /* crc of file being encrypted */
196 /* Encrypt random header (last two bytes is high word of crc) */
202 ztemp = zencode((int)(crc >> 16) & 0xff, t);
204 ztemp = zencode((int)(crc >> 24) & 0xff, t);
238 crypthead(passwd, z->crc, dest);
300 /* If last two bytes of header don't match crc (or file time in the
306 (z->flg & 8 ? (ush) z->tim & 0xffff : (ush)(z->crc >> 1
[all...]
H A Dcryptf.c173 * and the cyclic redundancy check crc.
175 void crypthead(passwd, crc, zfile)
177 ulg crc; /* crc of file being encrypted */
199 /* Encrypt random header (last two bytes is high word of crc) */
205 ztemp = zencode((int)(crc >> 16) & 0xff, t);
207 ztemp = zencode((int)(crc >> 24) & 0xff, t);
241 crypthead(passwd, z->crc, dest);
303 /* If last two bytes of header don't match crc (or file time in the
309 (z->flg & 8 ? (ush) z->tim & 0xffff : (ush)(z->crc >> 1
[all...]
/haiku-fatelf/src/libs/compat/freebsd_wlan/net80211/
H A Dieee80211_crypto_tkip.c589 u32 i, j, k, crc; local
606 crc = ~0;
616 crc = crc32_table[(crc ^ *pos) & 0xff] ^ (crc >> 8);
631 crc = ~crc;
634 icv[0] = crc;
635 icv[1] = crc >> 8;
636 icv[2] = crc >> 1
649 u32 i, j, k, crc; local
[all...]
/haiku-fatelf/src/libs/agg/src/dbg_new/
H A Dagg_dbg_new.cpp179 // The variable corresponding to the macro argument "crc" should
263 unsigned long crc = (unsigned long)~0; local
270 crc = (crc >> 8) ^ crc32tab[(crc ^ *p) & 0xff];
272 return ~crc;
/haiku-fatelf/src/system/kernel/debug/
H A Ddebug_paranoia.cpp60 uint32 crc = 0xffffffff; local
63 crc = (crc >> 8) ^ sCRC32Table[(crc & 0xff) ^ *data];
67 return crc;
/haiku-fatelf/src/add-ons/kernel/drivers/network/vlance/
H A Dvlance.c433 uint32 crc, poly = CRC_POLYNOMIAL_LE; local
463 crc = 0xffffffff;
468 test = ((bit ^ crc) & 0x01);
469 crc >>= 1;
471 crc = crc ^ poly;
474 crc = crc >> 26;
475 mcast_table[crc >> 4] |= 1 << (crc
[all...]
/haiku-fatelf/src/add-ons/kernel/drivers/network/wlan/ralink2860/dev/rt2860/
H A Drt2860_io.c52 #define RT2860_IO_BYTE_CRC16(byte, crc) \
53 ((uint16_t) (((crc) << 8) ^ rt2860_io_ccitt16[(((crc) >> 8) ^ (byte)) & 255]))
692 uint16_t crc; local
694 for (i = 0, crc = 0xffff; i < len - 2; i++)
695 crc = RT2860_IO_BYTE_CRC16(rt2860_io_byte_rev(ucode[i]), crc);
697 if (ucode[len - 2] != rt2860_io_byte_rev(crc >> 8) ||
698 ucode[len - 1] != rt2860_io_byte_rev(crc))
700 printf("%s: wrong microcode crc\
[all...]
/haiku-fatelf/src/bin/gdb/bfd/
H A Dopncls.c884 (unsigned long crc, const unsigned char *buf, bfd_size_type len);
888 Advances the previously computed @var{crc} value by computing
896 bfd_calc_gnu_debuglink_crc32 (unsigned long crc,
957 crc = ~crc & 0xffffffff;
959 crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8);
960 return ~crc & 0xffffffff;;
1024 separate_debug_file_exists (const char *name, const unsigned long crc)
895 bfd_calc_gnu_debuglink_crc32(unsigned long crc, const unsigned char *buf, bfd_size_type len) argument
1023 separate_debug_file_exists(const char *name, const unsigned long crc) argument
[all...]
/haiku-fatelf/src/add-ons/kernel/drivers/network/pcnet/dev/le/
H A Dlance.c592 uint32_t crc; local
596 * through a crc generator, and then using the high order 6 bits as an
613 crc = ether_crc32_le(LLADDR((struct sockaddr_dl *)
617 crc >>= 26;
620 af[crc >> 4] |= LE_HTOLE16(1 << (crc & 0xf));
/haiku-fatelf/src/bin/gzip/
H A Dutil.c33 extern ulg crc_32_tab[]; /* crc table, defined below */
56 * Run a set of bytes through the crc shift register. If s is a NULL
57 * pointer, then initialize the crc shift register contents instead.
58 * Return the current crc in either case.
66 static ulg crc = (ulg)0xffffffffL; /* shift register contents */ local
71 c = crc;
76 crc = c;
130 * Write the output window window[0..outcnt-1] and update crc and bytes_out.
H A Dgzip.c1274 header_bytes = inptr + 2*sizeof(long); /* include crc and size */
1330 ulg crc; /* original crc */ local
1344 printf("method crc date time ");
1364 crc = (ulg)~0; /* unknown */
1370 /* Get the crc and uncompressed size for gzip'ed (not zip'ed) files.
1383 crc = LG(buf);
1391 printf("%5s %08lx %11s ", methods[method], crc, date);
/haiku-fatelf/src/libs/zlib/
H A Dgzread.c189 if (flags & 2) { /* header crc */
228 to point to the just decompressed data, and the crc is updated. If the
238 unsigned long crc, len; local
270 /* update available output and crc check value */
277 if (gz_next4(state, &crc) == -1 || gz_next4(state, &len) == -1) {
281 if (crc != strm->adler) {
/haiku-fatelf/headers/private/firewire/
H A Dfirewire.h408 uint32_t crc:16, member in struct:fw_topology_map
417 uint32_t crc:16, member in struct:fw_speed_map
/haiku-fatelf/src/bin/gdb/gdb/
H A Dm32r-stub.c549 crc32 (unsigned char *buf, int len, unsigned long crc) argument
567 crc = (crc << 8) ^ crc32_table[((crc >> 24) ^ *buf) & 255];
570 return crc;
/haiku-fatelf/src/libs/agg/font_freetype/
H A Dagg_font_freetype.cpp29 // The variable corresponding to the macro argument "crc" should
113 unsigned crc = (unsigned)~0; local
120 crc = (crc >> 8) ^ crc32tab[(crc ^ *p) & 0xff];
122 return ~crc;
/haiku-fatelf/src/libs/pdflib/libs/png/
H A Dpng.c190 png_ptr->crc = crc32(0, Z_NULL, 0);
216 png_ptr->crc = crc32(png_ptr->crc, ptr, (uInt)length);

Completed in 200 milliseconds

1234