phpseclib\Crypt\Common\PKCS8::getPBES1Hash PHP Method

getPBES1Hash() static public method

Returns a hash based on a PBES1 $algo
static public getPBES1Hash ( string $algo )
$algo string
    static function getPBES1Hash($algo)
    {
        if (preg_match('#^pbeWith(MD2|MD5|SHA1|SHA)And.*?-CBC$#', $algo, $matches)) {
            return $matches[1] == 'SHA' ? 'sha1' : $matches[1];
        }
        return 'sha1';
    }