Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57148 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63413 invoked from network); 29 Dec 2011 18:17:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Dec 2011 18:17:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=paullik.paul@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=paullik.paul@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.83.42 as permitted sender) X-PHP-List-Original-Sender: paullik.paul@gmail.com X-Host-Fingerprint: 74.125.83.42 mail-ee0-f42.google.com Received: from [74.125.83.42] ([74.125.83.42:58925] helo=mail-ee0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 26/31-46834-DAEACFE4 for ; Thu, 29 Dec 2011 13:17:18 -0500 Received: by eeke51 with SMTP id e51so11665079eek.29 for ; Thu, 29 Dec 2011 10:17:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=/2wuM2UcJhMb3OFL4tzMWBcEIHfIDW/eD5rhSfiAYys=; b=v5oetA8TYmwkDRaa090Jh7oPMZ+VefQGzINLXaV+U1PUFhJuASVQ3uR9IphFwlPFpX MF+GGcMx2Cnj9NNl6WIibm9PcJ6iPaWPKN/cJJaNNujEkbJ3oDGe+mxz8dF9Rvf6Zy7e BstL6xFoYVWPr5d4ktD/SvNTL5SVpy46L4mxM= Received: by 10.14.52.200 with SMTP id e48mr14423020eec.72.1325182634135; Thu, 29 Dec 2011 10:17:14 -0800 (PST) Received: from [192.168.16.100] ([188.24.237.126]) by mx.google.com with ESMTPS id a60sm137061241eeb.4.2011.12.29.10.17.12 (version=SSLv3 cipher=OTHER); Thu, 29 Dec 2011 10:17:13 -0800 (PST) Message-ID: <4EFCAF09.7090106@gmail.com> Date: Thu, 29 Dec 2011 20:18:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20111224 Thunderbird/9.0.1 MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: SESSID string length heuristics From: paullik.paul@gmail.com ("Barbu Paul Gh.") Hello. I'd like to know what's the explanation behind the math done on line #413 in ext/session/session.c [1] and why couldn't it be just: total_bits / hash_bits_per_character Where total_bits equals 128 if the hash function is md5 or 160 if sha1. [1] http://svn.php.net/viewvc/php/php-src/trunk/ext/session/session.c?view=markup -- Common sense is not so common - Voltaire http://tweak-it.tk/ - Personal portfolio and web-log - Barbu Paul - Gh. Visit My GitHub profile to see my open-source projects - https://github.com/paullik