Merge branch '3.0'

This commit is contained in:
terrafrost 2022-02-14 17:59:57 -06:00
commit ffbddd8152

View File

@ -228,7 +228,7 @@ class PrivateKey extends RSA implements Common\PrivateKey
$h = $this->hash->hash($m2);
$ps = str_repeat(chr(0), $emLen - $sLen - $this->hLen - 2);
$db = $ps . chr(1) . $salt;
$dbMask = $this->mgf1($h, $emLen - $this->hLen - 1);
$dbMask = $this->mgf1($h, $emLen - $this->hLen - 1); // ie. stlren($db)
$maskedDB = $db ^ $dbMask;
$maskedDB[0] = ~chr(0xFF << ($emBits & 7)) & $maskedDB[0];
$em = $maskedDB . $h . chr(0xBC);