1
0
mirror of https://github.com/php/php-src.git synced 2026-04-16 20:41:18 +02:00
Files
archived-php-src/ext/standard/tests/strings/bug73058.phpt

24 lines
582 B
PHP

--TEST--
Bug #73058 crypt broken when salt is 'too' long
--FILE--
<?php
$pass = 'secret';
$salt = '$2y$07$usesomesillystringforsalt$';
var_dump(crypt($pass, $salt));
$salt = '$2y$07$usesomesillystringforsaltzzzzzzzzzzzzz$';
var_dump(crypt($pass, $salt));
$salt = '$2y$07$usesomesillystringforx';
var_dump(crypt($pass, $salt));
?>
==OK==
--EXPECT--
string(60) "$2y$07$usesomesillystringforex.u2VJUMLRWaJNuw0Hu2FvCEimdeYVO"
string(60) "$2y$07$usesomesillystringforex.u2VJUMLRWaJNuw0Hu2FvCEimdeYVO"
string(60) "$2y$07$usesomesillystringforuw2Gm1ef7lMsvtzSK2p/14F0q1e8uOCO"
==OK==