Commit 8d3151b1 by Taylor Otwell

refactoring the crypter class.

parent 0be75fc2
...@@ -55,16 +55,10 @@ class Crypter { ...@@ -55,16 +55,10 @@ class Crypter {
*/ */
protected static function randomizer() protected static function randomizer()
{ {
if (defined('MCRYPT_DEV_URANDOM')) foreach (array('MCRYPT_DEV_URANDOM', 'MCRYPT_DEV_RANDOM', 'MCRYPT_RAND') as $generator)
{ {
return MCRYPT_DEV_URANDOM; if (defined($generator)) return constant($generator);
} }
elseif (defined('MCRYPT_DEV_RANDOM'))
{
return MCRYPT_DEV_RANDOM;
}
return MCRYPT_RAND;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment