mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-02-05 21:38:27 +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 = new Crypt_Hash();
|
||||||
$hmac->setHash($hash);
|
$hmac->setHash($hash);
|
||||||
$hmac->setKey($password);
|
$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) {
|
for ($j = 2; $j <= $count; ++$j) {
|
||||||
$u = $hmac->hash($u);
|
$u = $hmac->hash($u);
|
||||||
$f^= $u;
|
$f^= $u;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user