Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Telepathy Communications Library - <b>tp_crc32()</b> - compute zmodem-style crc http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   tp_crc32() - compute Zmodem-style CRC

   nCRC := tp_crc32(cString)

   cString     String to checksum.

   Returns     32-bit numeric CRC.

   Computes a 32-bit cyclic redundancy checksum (CRC) by the same
   algorithm used in Zmodem (with 32-bit CRCs enabled).  The value
   returned is numeric, and should be converted to a string with l2bin()
   before you try to send it as data.

   If you append the CRC (after l2bin()) to the end of a string, then
   compute the CRC of the resulting string, you will get the magic
   number 558161692 if the CRC is correct.  That is,

       tp_crc32(string + l2bin(tp_crc32(string))) == 558161692

   [5.0] The header file telepath.ch defines a manifest constant
   TP_32MAGIC as 558161692.

See Also: tp_crc16()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson