Skip to content

Commit

Permalink
Blowfish: fix bad merge
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed May 22, 2024
1 parent 624a91e commit 0aae9c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phpseclib/Crypt/Blowfish.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ protected function setupKey(): void
$this->bctx['p'][$i ] = $l;
$this->bctx['p'][$i + 1] = $r;
}
for ($i = 0; $i < 0x400; $i+= 0x100) {
for ($i = 0; $i < 0x400; $i += 0x100) {
for ($j = 0; $j < 256; $j += 2) {
[$l, $r] = array_values(unpack('N*', $data = $this->encryptBlock($data)));
$this->bctx['sb'][$i | $j] = $l;
Expand Down Expand Up @@ -504,7 +504,7 @@ public static function bcrypt_pbkdf(string $pass, string $salt, int $keylen, int
* @param int[] $p
* @see self::_bcrypt_hash()
*/
private static function expand0state(array $key, array &$sbox0, array &$sbox, array &$p): void
private static function expand0state(array $key, array &$sbox, array &$p): void
{
// expand0state is basically the same thing as this:
//return self::expandstate(array_fill(0, 16, 0), $key);
Expand Down

0 comments on commit 0aae9c7

Please sign in to comment.