password_get_info

Supported Versions: PHP 5 >= 5.5.0, PHP 7, PHP 8
Returns information about the given hash
password_get_info(string $hash): array
    public function info($hashedValue)

    {

        return 
password_get_info($hashedValue);

    }
        $this->assertTrue($hasher->check('password'$value));

        
$this->assertFalse($hasher->needsRehash($value));

        
$this->assertTrue($hasher->needsRehash($value, ['rounds' => 1]));

        
$this->assertSame('bcrypt'password_get_info($value)['algoName']);

    }



    public function 
testBasicArgon2iHashing()
        $this->assertTrue($hasher->check('password'$value));

        
$this->assertFalse($hasher->needsRehash($value));

        
$this->assertTrue($hasher->needsRehash($value, ['threads' => 1]));

        
$this->assertSame('argon2i'password_get_info($value)['algoName']);

    }



    public function 
testBasicArgon2idHashing()
        $this->assertTrue($hasher->check('password'$value));

        
$this->assertFalse($hasher->needsRehash($value));

        
$this->assertTrue($hasher->needsRehash($value, ['threads' => 1]));

        
$this->assertSame('argon2id'password_get_info($value)['algoName']);

    }