Download the PHP package 20steps/bricks-scrypt-password-encoder-bundle without Composer

On this page you can find all versions of the php package 20steps/bricks-scrypt-password-encoder-bundle. 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 bricks-scrypt-password-encoder-bundle

UsuScryptPasswordEncoderBundle

This Bundle provides a Symfony2 and Symfony3 password encoder service that uses scrypt for password encoding.

Build Status Latest Stable Version Total Downloads License

Why you should use scrypt

The scrypt key derivation function is designed to be far more secure against hardware brute-force attacks than alternative functions such as PBKDF2 or bcrypt.

KDF comparison

The designers of scrypt estimate that on modern (2009) hardware, if 5 seconds are spent computing a derived key, the cost of a hardware brute-force attack against scrypt is roughly 4000 times greater than the cost of a similar attack against bcrypt (to find the same password), and 20000 times greater than a similar attack against PBKDF2.

But I'm already using Bcrypt!

Installation

Add this to your composer.json:

Then run:

Add the bundle in app/AppKernel.php:

And, finally, set the encoder in app/config/security.yml:

security:
    encoders:
        Symfony\Component\Security\Core\User\User:
            id: security.encoder.scrypt

Or, if you are using the excellent FOSUserBundle:

security:
    encoders:
        FOS\UserBundle\Model\UserInterface:
          id: security.encoder.scrypt

Configuration

You can change the default bundle values (shown below) by adding the following to your config.yml file:

usu_scrypt_password_encoder:
    cpu_cost: 2048
    memory_cost: 4
    parallelization_cost: 1
    key_length: 64

Changing any of the above parameters will result in a different key (auto updating of old passwords is not currently supported).

The parameter key_length determines the size in bytes of the derived key; eg: a 64 bytes key will result in a 88 characters string after the automatic base64_encode.

Please refer to the original documentation for additional informnation.

Testing

This bundle is fully tested with PHPUnit.

Go to the root folder, install the dev dependencies with composer, and then run the phpunit test suite

License

This bundle is released under the MIT license. See the complete license in the bundle:

Resources/meta/LICENSE

Acknowledgements

I would like to thank elnur for creating the great ElnurBlowfishPasswordEncoderBundle that inspired me to release this and pbhogan from which I borrowed the "Why you should use scrypt" readme section.


All versions of bricks-scrypt-password-encoder-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
symfony/framework-bundle Version ~2.0 | ^3.0
symfony/security-bundle Version ~2.0 | ^3.0
zendframework/zend-crypt Version ~2.2
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 20steps/bricks-scrypt-password-encoder-bundle contains the following files

Loading the files please wait ....