bug 3082: random key generation algorithm
git-svn-id: http://piwigo.org/svn/trunk@28571 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
b317745ac9
commit
13a70520fa
1 changed files with 0 additions and 10 deletions
|
@ -62,16 +62,6 @@ if (isset($conf['session_save_handler'])
|
||||||
*/
|
*/
|
||||||
function generate_key($size)
|
function generate_key($size)
|
||||||
{
|
{
|
||||||
global $conf;
|
|
||||||
|
|
||||||
$md5 = md5(substr(microtime(), 2, 6));
|
|
||||||
$init = '';
|
|
||||||
for ( $i = 0; $i < strlen( $md5 ); $i++ )
|
|
||||||
{
|
|
||||||
if ( is_numeric( $md5[$i] ) ) $init.= $md5[$i];
|
|
||||||
}
|
|
||||||
$init = substr( $init, 0, 8 );
|
|
||||||
mt_srand( $init );
|
|
||||||
$key = '';
|
$key = '';
|
||||||
for ( $i = 0; $i < $size; $i++ )
|
for ( $i = 0; $i < $size; $i++ )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue