mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-15 19:16:55 +00:00
Twofish: bugfix in setPasswort()
fixed bug in setPasswort()... (occurred only in Twofish.php)
This commit is contained in:
parent
eabd0a8963
commit
448be87e83
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user