RE: [PHP] 8 bit check sum???? Not 32 bit

From: Date: Wed, 16 Jan 2002 19:44:45 +0000
Subject: RE: [PHP] 8 bit check sum???? Not 32 bit
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-80803@lists.php.net to get a copy of this message
This is a strange request but here you go. function CRC8bit($data){ return (crc32($data) & 255); } -----Original Message----- From: Brian C. Doyle [mailto:bcdoyle@mindspring.com] Sent: Wednesday, January 16, 2002 11:34 AM To: php-general@lists.php.net Subject: [PHP] 8 bit check sum???? Not 32 bit Hello all, I currently have a perl subroutine that uses an 8 bit check sum. From what I have found, in books and the site, php will only do 32 bit. Here is what I have currently sub _hash_domain { return uc( unpack('H2', pack('C', unpack("%8C*", shift) ) ) ); } This works fine in perl but I would like to get this to work in PHP What am I missing. Thanks for you help Brian C. Doyle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#80803) next »