Results 1 to 1 of 1
-
5th Dec 2010, 05:25 AM #1OPRespected DeveloperWebsite's:
X4B.org[PHP] 16bit hashing algo
reverse CRC16 with some minor changes, extremely fast for a user code hashing algorithm.
PHP Code:/* reverse CRC16 */
function rCRC16($d)
{
if(empty($d)) return 0;
$crc = 0xFFFF;
for ($i = (strlen($d)-1); $i ; --$i)
{
$x = (($crc >> 8) ^ ord($d[$i])) & 0xFF;
$x ^= $x >> 4;
$crc = (($crc << 8) ^ ($x << 12) ^ ($x << 5) ^ $x) & 0xFFFF;
}
return $crc;
}
SplitIce Reviewed by SplitIce on . [PHP] 16bit hashing algo reverse CRC16 with some minor changes, extremely fast for a user code hashing algorithm. /* reverse CRC16 */ function rCRC16($d) { if(empty($d)) return 0; $crc = 0xFFFF; for ($i = (strlen($d)-1); $i ; --$i) { Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Permutation Algo
By BJ@008 in forum Web Development AreaReplies: 11Last Post: 14th Feb 2012, 04:03 PM
themaLeecher - leech and manage...
Version 5.03 released. Open older version (or...