Twofish: bugfix in setPasswort()

fixed bug in setPasswort()... (occurred only in Twofish.php)
This commit is contained in:
Hans-Jürgen Petrich 2013-05-19 23:35:06 +07:00
parent eabd0a8963
commit 448be87e83

View File

@ -793,7 +793,7 @@ class Crypt_Twofish {
$hmac = new Crypt_Hash();
$hmac->setHash($hash);
$hmac->setKey($password);
$f = $u = $hmac->hash($salt . pack('N', ++$i));
$f = $u = $hmac->hash($salt . pack('N', $i++));
for ($j = 2; $j <= $count; ++$j) {
$u = $hmac->hash($u);
$f^= $u;