mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Add test cases to check compatibility between the `hash("algo")` and `md5()`/`sha1()` functions.
17 lines
451 B
PHP
17 lines
451 B
PHP
--TEST--
|
|
Hash: md5 algorithm
|
|
--FILE--
|
|
<?php
|
|
echo hash('md5', '') . "\n";
|
|
echo hash('md5', 'a') . "\n";
|
|
echo hash('md5', '012345678901234567890123456789012345678901234567890123456789') . "\n";
|
|
echo hash('md5', str_repeat('a', 1000000)) . "\n";
|
|
var_dump(hash('md5', 'string') === md5('string'));
|
|
?>
|
|
--EXPECT--
|
|
d41d8cd98f00b204e9800998ecf8427e
|
|
0cc175b9c0f1b6a831c399e269772661
|
|
1ced811af47ead374872fcca9d73dd71
|
|
7707d6ae4e027c70eea2a935c2296f21
|
|
bool(true)
|