Obsolete code because crc32() does exist in our minimum php requirements.
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 15 Jan 2003 15:49:23 +0000 (15:49 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 15 Jan 2003 15:49:23 +0000 (15:49 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4424 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/strings.php

index ff47b17beef8c8b44a335b32082670bf5c83c280..b4d1a5406549c10609cc94438d52502f8db26a61 100644 (file)
@@ -284,24 +284,7 @@ function sq_mt_seed($Val) {
     $Max = mt_getrandmax();
     
     if (! is_int($Val)) {
-        if (function_exists('crc32')) {
             $Val = crc32($Val);
-        } else {
-            $Str = $Val;
-            $Pos = 0;
-            $Val = 0;
-            $Mask = $Max / 2;
-            $HighBit = $Max ^ $Mask;
-            while ($Pos < strlen($Str)) {
-                if ($Val & $HighBit) {
-                    $Val = (($Val & $Mask) << 1) + 1;
-                } else {
-                    $Val = ($Val & $Mask) << 1;
-                }
-                $Val ^= $Str[$Pos];
-                $Pos ++;
-            }
-        }
     }
     
     if ($Val < 0) {