Download the PHP package jabarihunt/password without Composer

On this page you can find all versions of the php package jabarihunt/password. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package password

Password Class

This is a simple class that uses the standard PHP methods _password_hash() and password_verify()_ to create a hashed password and compare the hash to entered passwords respectively. The primary purpose of this class is to remove some of the boilerplate code required when performing these password operations.

The class defaults to using the default algorithm that PHP selects (per version) and a cost of 10. Both can be set when creating the hash.

NOTE: It is recommended that database columns that store hashes created with password_hash() are at least 255 characters wide, as the length of hashes will grow in future versions of PHP!

INSTALLING

Via Composer

Run the following command in the same directory as your composer.json file:

php composer.phar require jabarihunt/password

Via Github

  1. Clone this repository into a working directory: git clone [email protected]:jabarihunt/password .

  2. Include the Password class in your project...

...or if using an auto-loader...

USAGE

The Password::create() and Password::compare() methods will throw exceptions if invalid data is passed to them, so be sure to use try/catch blocks!

Creating Password Hashes

Comparing Passwords And Hashes

Using our first hash from above...

Validating Passwords

There is a third method, Password::isValid(), that validates if a password follows the below rules and returns a boolean. Eventually I'll add functionallity to pass your own rules. This method doesn't throw any exceptiones.

Password Rules:

You can optionally pass a second string parameter called $username that will make sure the password does not contain the username (or whatever the passed string contains).

CONTRIBUTING

  1. Fork Repository
  2. Create a descriptive branch name
  3. Make edits to your branch
  4. Squash (rebase) your commits
  5. Create a pull request

LICENSE

This project is licensed under the MIT License - see the LICENSE.md file for details


All versions of password with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jabarihunt/password contains the following files

Loading the files please wait ....