public function getPasswordCost(?int $cost = null) : int
    {
        if ($cost !== null) {
            return $cost;
        }

        /** @var \Illuminate\Contracts\Config\Repository $config */
        $config = $this->config ?? config();

        return $config->get('laranixauth.password.cost', 12);
    }