From 3713fe25aeabdc580891dece6316bc0c55b8b369 Mon Sep 17 00:00:00 2001 From: phpnut Date: Sat, 5 Jul 2008 15:03:46 +0000 Subject: [PATCH] Reverting change to Security::cipher(); in [7322]. Newer versions of PHP 5.2.1 and above no longer produce same identical seeds git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7324 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/security.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cake/libs/security.php b/cake/libs/security.php index 86831b35e..400cb45f2 100644 --- a/cake/libs/security.php +++ b/cake/libs/security.php @@ -183,14 +183,14 @@ class Security extends Object { //This is temporary will change later define('CIPHER_SEED', '76859309657453542496749683645'); } - mt_srand(CIPHER_SEED); + srand(CIPHER_SEED); $out = ''; for ($i = 0; $i < strlen($text); $i++) { for ($j = 0; $j < ord(substr($key, $i % strlen($key), 1)); $j++) { - $toss = mt_rand(0, 255); + $toss = rand(0, 255); } - $mask = mt_rand(0, 255); + $mask = rand(0, 255); $out .= chr(ord(substr($text, $i, 1)) ^ $mask); } return $out;