crc32, md5 & sha1 functions
| From: | Alexander Valyalkin | Date: | Mon, 21 Mar 2005 20:17:19 +0000 |
| Subject: | crc32, md5 & sha1 functions | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-15527@lists.php.net to get a copy of this message | ||
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.