Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15527 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99422 invoked by uid 1010); 21 Mar 2005 21:11:48 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 99405 invoked by uid 1007); 21 Mar 2005 21:11:48 -0000 Message-ID: <20050321211147.99392.qmail@lists.php.net> To: internals@lists.php.net Date: Mon, 21 Mar 2005 23:17:19 +0300 Lines: 13 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Posted-By: 207.226.20.21 Subject: crc32, md5 & sha1 functions From: valyala@gmail.com ("Alexander Valyalkin") crc32, md5 and sha1 functions, implemented in PHP, are widely used for computing "fingerprint" of any data. But current implementation has not very good limitation - there is no way to get/set current state vector of these functions. So, we have to pass whole amount of data as argument of these functions at once instead of sequently data processing. Of course, we can use md5_file() or sha1_file() to get hash of huge amounts of data, but there is missing crc32_file() analog. I think, the best way is to add optional parameter to these functions, which will allow to get/set current state vector of hash algorithms. This change will not break backward compatibility.