1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/hash
Lior Kaplan ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
..
2015-09-02 00:37:20 -07:00
2013-08-09 11:47:25 +02:00
2013-08-06 22:49:56 +02:00
2016-01-01 19:48:25 +02:00
2016-01-01 19:48:25 +02:00
2016-01-01 19:48:25 +02:00
2016-01-01 19:48:25 +02:00
2013-08-06 22:49:56 +02:00
2016-01-01 19:48:25 +02:00

Generic hashing framework for PHP

Simplest usages:

$digest = hash($algoname, $message);
$digest = hash_file($algoname, $filename);

Examples:

$digest = hash('md5', 'The quick brown fox jumped over the lazy dog.');

Feeder usage:

$context = hash_init($algoname);
hash_update($context, $message);
$digest = hash_final($context);

hash(), hash_file(), and hash_final() each support an optional boolean parameter $raw_output which behaves in the same 
manner as sha1()'s optional parameter.