mirror of
https://github.com/php/php-src.git
synced 2026-03-29 03:32:20 +02:00
load64() counted down from 7..0, but the decrement turned 0 into 255. This means the loop would never terminate on Big Endian systems. Just use signed char integers since we're only dealing with values from 0..7 anyway. Closes https://bugs.php.net/bug.php?id=73282
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.