Sets the password for the user

@param string $password
@param string $algorithm
@param array $options [optional]
4949
public function setPassword($password, $algorithm = PasswordFile::ALG_MD5, array $options = null)
    {
        $this->hash = Crypt::hash($password, $algorithm, $options);
    }
168463
public function setPassword(string $password): User
    {
        DB::table('user')
            ->where('user_id', '=', $this->user_id)
            ->update([
                'password' => password_hash($password, PASSWORD_DEFAULT),
            ]);

        return $this;
    }
545867
public function check($value, $hashedValue, array $options = [])
    {
        if ($this->verifyAlgorithm && $this->info($hashedValue)['algoName'] !== 'argon2id') {
            throw new RuntimeException('This password does not use the Argon2id algorithm.');
        }

        if (strlen($hashedValue) === 0) {
            return false;
        }

        return password_verify($value, $hashedValue);
    }
473533
protected function resetPassword($user, $password)
    {
        $user->forceFill([
            'password' => bcrypt($password),
            'remember_token' => Str::random(60),
        ])->save();
    }
309725
public function setPlainPassword($password)
    {
        $this['salt'] || $this['salt'] = $this->password->generateSalt();
        $this['password'] = $this->password->hash($password, $this['salt']);

        return $this;
    }
1212438
public function setPasswordAttribute($password)
    {
        if (!empty($password)) {
            $password = bcrypt($password);
            JWTUtilities::invalidateTokenByUserId($this->id);
            // When password is set user account must be confirmed. Confirming user
            // account here with confirm_code = null.
            // confirm_code = 'y' indicates cases where account is confirmed by user
            // using confirmation email.
            if (isset($this->attributes['confirm_code']) && $this->attributes['confirm_code'] !== 'y') {
                $this->attributes['confirm_code'] = null;
            }
        }

        $this->attributes['password'] = $password;
    }
1238599
public static function password($name, $value = null, array $options = [])
    {
        self::exclure($options);

        return self::input('password', $name, $value, $options);
    }
408589
public function generateKey(array $options = array())
	{
		// Create the new encryption key object.
		$key = new Key($this->keyType);

		// Generate an initialisation vector based on the algorithm.
		$key->public = mcrypt_create_iv(mcrypt_get_iv_size($this->type, $this->mode));

		// Get the salt and password setup.
		$salt = (isset($options['salt'])) ? $options['salt'] : substr(pack("h*", md5(mt_rand())), 0, 16);
		$password = (isset($options['password'])) ? $options['password'] : 'J00ml4R0ck$!';

		// Generate the derived key.
		$key->private = $this->pbkdf2($password, $salt, mcrypt_get_key_size($this->type, $this->mode));

		return $key;
	}
1067762
public function beforeSave($event, $entity, $options)
    {
        $entity->set('cakeadmin', true);

        $newPassword = $entity->get('new_password');

        if (!empty($newPassword)) {
            $entity->set('password', $entity->new_password); // set for password-changes
        }
    }
609498
private function getPasswordHashStrategy(string $algorithm): PasswordHashStrategyInterface
    {
        if (!isset($this->passwordHashStrategies[$algorithm])) {
            throw new UnavailablePasswordHashStrategy(
                'The password requested hash algorithm: "' . $algorithm . '" is not available.'
            );
        }

        $passwordHashStrategy = $this->passwordHashStrategies[$algorithm];
        $passwordHashStrategy->initialize();

        return $passwordHashStrategy;
    }
1039266
public function setPassword($password)
    {
        if (empty($password)) {
            $this->hashedPassword = null;
        } else {
            $this->hashedPassword = UsersManager::getPasswordHash($password);
        }
    }
1273855
public static function CreateSecurePassword ($password, $key, $algorithm = self::PASSWORD_HASH_ALGORITHM) {
		return hash_hmac($algorithm, $password, $key);
	}
869216
public static function set($key, $value, $options = []) {
		array_key_set(self::$settings, $key, $value, $options);
	}
1126452
public static function setSslCertificate($path, $password=false)
	{
		self::$options[CURLOPT_SSLCERT] = $path;

		if ($password) {
			self::$options[CURLOPT_SSLCERTPASSWD] = $password;
		}
	}
1114180
public function setPassword($password)
    {
        if ($this->isNew() && ($password === null || trim($password) == "")) {
            throw new InvalidArgumentException("customer password is mandatory on creation");
        }

        if ($password !== null && trim($password) != "") {
            $this->setAlgo("PASSWORD_BCRYPT");

            parent::setPassword(password_hash($password, PASSWORD_BCRYPT));
        }

        return $this;
    }
536427
public function check($value, $hashedValue, array $options = [])
    {
        if ($this->verifyAlgorithm && $this->info($hashedValue)['algoName'] !== 'argon2i') {
            throw new RuntimeException('This password does not use the Argon2i algorithm.');
        }

        return parent::check($value, $hashedValue, $options);
    }
855695
public static function Connect ($dsn, $options = []) {
		$dsn = is_array($dsn) ? $dsn : IniFile::GetConfig($dsn, array_keys(static::$_enableIniRuleList), $options);

		if (isset($dsn['password']) && isset($options['key'])) {
			$algorithm = isset($options['algorithm']) ? $options['algorithm'] : self::PASSWORD_HASH_ALGORITHM;
			$dsn['password'] = static::CreateSecurePassword($dsn['password'], $options['key'], $algorithm);
		}

		$dsn_options = [];
		foreach ($dsn['options'] ?? [] as $option) {
			$dsn_options[(int)$option['name']] = (int)$option['value'];
		}
		$dsn['options'] = $dsn_options;

		$dsn['schemas'] = $dsn['schemas'] ?? [];

		static::$_dsnList[static::AdjustConnectionName($options, $dsn)][static::AdjustPriority($options)][static::AdjustStackNumber($options)] = $dsn;
	}