Generate a keyed hash value using the HMAC method and the contents of a given file with hash_hmac_file() in PHP
Description
The following code shows how to generate a keyed hash value using the HMAC method and the contents of a given file with hash_hmac_file().
Example
/*from w w w . ja v a 2 s . c o m*/
<?php
/* Create a file to calculate hash of */
file_put_contents('example.txt', 'The quick brown fox jumped over the lazy dog.');
echo hash_hmac_file('md5', 'example.txt', 'secret');
?>
The code above generates the following result.