1
0
mirror of https://github.com/php/php-src.git synced 2026-04-04 22:52:40 +02:00
Files
archived-php-src/ext/hash
Nikita Popov 93dc91b386 Remove version checks
PHP_VERSION_ID
PHP_API_VERSION
ZEND_MODULE_API_NO
PHP_MAJOR_VERSION, PHP_MINOR_VERSION
ZEND_ENGINE_2

I've left litespeed alone, as it seems to genuinely maintain support
for many PHP versions.
2016-01-30 15:35:28 +01:00
..
2015-10-15 20:36:49 -07:00
2015-10-15 20:36:49 -07: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-30 15:35:28 +01:00
2013-08-06 22:49:56 +02:00
2016-01-01 20:04:31 +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.