Supported Versions: PHP 5 >= 5.5.0, PHP 7, PHP 8
Creates a password hash
password_hash(string $passwordstring|int|null $algo, array $options = []): string
    public function make($value, array $options = [])

    {

        
$hash = @password_hash($value$this->algorithm(), [

            
'memory_cost' => $this->memory($options),

            
'time_cost' => $this->time($options),

            
'threads' => $this->threads($options),

        ]);



        if (! 
is_string($hash)) {

            throw new 
RuntimeException('Argon2 hashing not supported.');
    public function make($value, array $options = [])

    {

        
$hash password_hash($valuePASSWORD_BCRYPT, [

            
'cost' => $this->cost($options),

        ]);



        if (
$hash === false) {

            throw new 
RuntimeException('Bcrypt hashing not supported.');