Приглашаем посетить
Шмелев (shmelev.lit-info.ru)

Section 13.15.  File Checksums

Previous
Table of Contents
Next

13.15. File Checksums

PHP's sha1_file( ) function creates a checksum hash value using the SHA1 algorithm. To use it, pass the filename and capture the return value, like this:

    $sha1 = sha1_file($filename);

For MD5 hashing, you can use the function md5_file( ). It works in exactly the same way as sha1_file( ), except that it returns the MD5 hash as opposed to the SHA1 hash.


Previous
Table of Contents
Next