PHP » PYTHON |
login |
register |
about
|
import hashlib def md5_file(filename): crc = hashlib.md5() fp = open(filename, 'rb') for i in fp: crc.update(i) fp.close() return crc.hexdigest() md5_file(PHP 4 >= 4.2.0, PHP 5) md5_file — Calculates the md5 hash of a given file Description
string md5_file
( string $filename
[, bool $raw_output= false
] )
Calculates the MD5 hash of the file specified by the filename parameter using the » RSA Data Security, Inc. MD5 Message-Digest Algorithm, and returns that hash. The hash is a 32-character hexadecimal number. Parameters
Return ValuesReturns a string on success, FALSE otherwise. Changelog
Examples
Example #1 Usage example of md5_file()
<?php
See Also
|
more
Recently updated
more
Most requested
more
Last requests
|