2017 © Pedro Peláez
 

library php-bcrypt-wrapper

Simple PHP bcrypt wrapper

image

davidkuridza/php-bcrypt-wrapper

Simple PHP bcrypt wrapper

  • Monday, October 7, 2013
  • by davidkuridza
  • Repository
  • 1 Watchers
  • 8 Stars
  • 17 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

DEPRECATED

Please use PHP's password hashing functions or password_compat.

PHP bcrypt wrapper

Build Status, (*1)

PHP bcrypt is a wrapper to simplify the use of bcrypt algorithm in PHP., (*2)

Requirements

Installation

Copy Bcrypt/Bcrypt.php to location on the file system where needed., (*3)

To test whether Bcrypt works in your environment, you can simply run PHPUnit tests from root directory:, (*4)

$ phpunit

An Ant build script is provided to simplify setting up the environment in case you would like to contribute. Following targets are available:, (*5)

$ ant
Buildfile: build.xml

help:
     [echo] Usage: ant [target [target1 [target2] ...]]
     [echo] Targets:
     [echo]   help            print this message
     [echo]   build           setup env
     [echo]   clean           clean up and create artifact directories
     [echo]   tests           run unit tests

Running $ ant build will invoke clean and tests., (*6)

Usage

include 'Bcrypt.php';

// hash password before storing it
$hashed = Bcrypt::hash($password);

// check password by comparing it to its hashed value
$check  = Bcrypt::check($password, $hashed);

// use a stronger salt
$salt   = Bcrypt::salt(24); // 2^24 iterations
$hashed = Bcrypt::hash($password, $salt);

Contact

Feel free to contact me via david@kuridza.si or twitter., (*7)

The Versions

07/10 2013

dev-master

9999999-dev https://github.com/davidkuridza/php-bcrypt-wrapper

Simple PHP bcrypt wrapper

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by David Kuridža

password hash bcrypt