$salt]); } public static function bcypt($pwd) { $salt = Config::get('salt'); if ($salt == "") return password_hash($pwd, PASSWORD_BCRYPT); else return password_hash($pwd, PASSWORD_BCRYPT, ['salt' => $salt]); } public static function checkPassword($hashedPassword, $password) { if (in_array(Config::get('pwdMethod'), ['bcypt', 'argon2i'])) return password_verify($password, $hashedPassword); else return ($hashedPassword == self::passwordHash($password)); } }