Download the PHP package innoscience/passwordly without Composer

On this page you can find all versions of the php package innoscience/passwordly. 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 passwordly

Passwordly

An absurdly simple package for generating and validating random requirement-based passwords for PHP.

Build Status

Copyright (C) 2014 Brandon Fenning

Requirements

Compatible with PHP 5.3+

Installation

Add innoscience/passwordly to the composer.json file:

"require": {
    "innoscience/passwordly": "dev-master"
}

After this, run composer update

Usage

Passwordly is namespaced to innoscience/passwordly/passwordly, at the top of your file you'll want to use:

use Innoscience\Passwordly\Passwordly;

Creating passwords

When creating passwords, Passwordly first checks what the character requirements are. Any difference is made up with the addition of randomly cased alphanumeric characters.

Basic: generate random 8 character password, no symbols
$password = Password::can()->generate(8);
Password with 1 - 3 symbols and 8 - 16 characters in length
$password = Password::can()->hasSymbols(1,3)->generate(8, 16);
Password with at least 1 uppercase, lowercase and numeric character and 8 characters in length
$password = Password::can()->hasLower(1)->hasNumbers(1)->hasUpper(1)->generate(8);

Checking password

Check that password has at least 1 number and upper case letter and is at least 8 characters in length
$isOk = Password::can()->hasNumbers(1)->hasUpper(1)->hasLength(8)->check($password);
Check that password has no more than 1 to 3 numbers, 1 symbol and upper case letter and is at least 8 but not more than 16 characters in length
$isOk = Password::can()->hasNumbers(1,3)->hasUpper(1)->hasSymbols(1)->hasLength(8,16)->strict()->check($password);

When checking passwords, Passwordly does not use the maximum argument unless the ->strict() method is invoked.

Check password and get errors
$passwordCheck = new Passwordly();
$isOk = $passwordCheck->hasNumbers(1)->hasUpper(1)->check($password);
$errors = $passwordCheck->errors(); // # Returns array with each failed requirement

Details

Instantiating

Passwordly can be instantiated either via the Passwordly::can() static constructor or simply by calling new Passwordly. Reading the error messages requires access to the Passwordly instance, so chaining calls off of Passwordly::can() is not recommended for those use-cases.

Chainable Methods

Final Methods

Other Methods

Utility Methods

These utility methods affect all instances of Passwordly when used.

Tests

Passwordly is fully unit tested. Tests are located in the tests directory of the Passwordly package and can be run with phpunit in the package's base directory.

License

Passwordly is licensed under GPLv2


All versions of passwordly with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.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 innoscience/passwordly contains the following files

Loading the files please wait ...