Jose\Util\RSA::getMGF1 PHP Method

getMGF1() private static method

MGF1.
private static getMGF1 ( string $mgfSeed, integer $maskLen, Hash $mgfHash ) : string
$mgfSeed string
$maskLen integer
$mgfHash Hash
return string
    private static function getMGF1($mgfSeed, $maskLen, Hash $mgfHash)
    {
        $t = '';
        $count = ceil($maskLen / $mgfHash->getLength());
        for ($i = 0; $i < $count; $i++) {
            $c = pack('N', $i);
            $t .= $mgfHash->hash($mgfSeed . $c);
        }
        return mb_substr($t, 0, $maskLen, '8bit');
    }