git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4424
7612ce4b-ef26-0410-bec9-
ea0150e637f0
$Max = mt_getrandmax();
if (! is_int($Val)) {
$Max = mt_getrandmax();
if (! is_int($Val)) {
- if (function_exists('crc32')) {
- } 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 ++;
- }
- }