TypePHP 编译器 https://swoole.com/aot/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 lines
629 B

--TEST--
Bug #73058 crypt broken when salt is 'too' long
--SKIPIF--
<?php
echo 'skip AOT limitation';
?>
--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==