Changeset 28571


Ignore:
Timestamp:
May 29, 2014, 10:40:45 PM (6 years ago)
Author:
rvelices
Message:

bug 3082: random key generation algorithm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_session.inc.php

    r26461 r28571  
    6363function generate_key($size)
    6464{
    65   global $conf;
    66 
    67   $md5 = md5(substr(microtime(), 2, 6));
    68   $init = '';
    69   for ( $i = 0; $i < strlen( $md5 ); $i++ )
    70   {
    71     if ( is_numeric( $md5[$i] ) ) $init.= $md5[$i];
    72   }
    73   $init = substr( $init, 0, 8 );
    74   mt_srand( $init );
    7565  $key = '';
    7666  for ( $i = 0; $i < $size; $i++ )
Note: See TracChangeset for help on using the changeset viewer.