adjust comments in crypt class.

This commit is contained in:
Taylor Otwell
2011-08-06 20:44:13 -05:00
parent 68e3b468cf
commit 5664c9dc92

View File

@@ -24,11 +24,9 @@ class Crypt {
*/ */
public static function encrypt($value) public static function encrypt($value)
{ {
// Seed the system random number generator if it is being used. // If the system random number generator is being used, we need to seed
if (($random = static::randomizer()) === MCRYPT_RAND) // it to get adequately random results.
{ if (($random = static::randomizer()) === MCRYPT_RAND) mt_srand();
mt_srand();
}
$iv = mcrypt_create_iv(static::iv_size(), $random); $iv = mcrypt_create_iv(static::iv_size(), $random);