2017 © Pedro Peláez
 

library bcrypt

Bcrypt class stolen from the internet, for use with Composer.

image

eddieantonio/bcrypt

Bcrypt class stolen from the internet, for use with Composer.

  • Sunday, September 22, 2013
  • by eddieantonio
  • Repository
  • 1 Watchers
  • 1 Stars
  • 8,471 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 5 % Grown

The README.md

Bcrypt.php

Forked (from myself) at BitBucket., (*1)

This is my personal Bcrypt wrapper class-thing I use in my projects for Bcrypting buisness. It was mostly not written by me -- check the file comment in the file for all the peeps I attribute this file to. That said, a quick check on the internet shows a bajillion and one files exactly like this one, all with different names. THE PEOPLE'S BCRYPT MINILIBRARY... THING., (*2)

It is based on Andrew Moore's answer on StackOverflow. If you're using PHP 5.5 or greater, use [password_hash][2] instead., (*3)

Use at your own risk. I offer absolutely no warranty on the cryptographic amazingness of this library, nor do any of the original authors... probably., (*4)

Usage

Use the convenience functions to do some simple hashing and verifying of hashes., (*5)


$hashed = \Bcrypt\hash('this is a random string'); // elsewhere... $plain_text_password = //... if (\Bcrypt\verify($plain_text_password, $user_pass_hash)) { login(); }

For more fine-grained control, instantiate a Bcrypt object:, (*6)


// Control the prefix, number of rounds... $bcrypt = new \Bcrypt\Bcrypt('prefix', 15); // And use the instance to produce many hashes. $hashes[] = $bcrypt->hash('this is a string'); $hashes[] = $bcrypt->hash('this is another string'); // You can also do this: if ($bcrypt->verify($plain_text_password, $user_pass_hash)) { login(); }

Composer

If you're using Composer, you can just add this to your require list:, (*7)

{
    "require": {
        "eddieantonio/bcrypt": "0.3.0"
    }
}

License

Creative Commons Public Domain Declaration, (*8)

Since the meat of this code was stolen from various sources who simply posted the code on the internet with no license, I consider this library to be public domain by default and take no credit in writing it; simply polishing it up such that it can be easily used with Composer., (*9)

The Versions

22/09 2013

dev-master

9999999-dev

Bcrypt class stolen from the internet, for use with Composer.

  Sources   Download

CC0-1.0

The Development Requires

by Eddie Antonio Santos

25/02 2013

0.3.3

0.3.3.0

Bcrypt class stolen from the internet, for use with Composer.

  Sources   Download

CC0-1.0

The Development Requires

by Eddie Antonio Santos

24/02 2013

0.3.1

0.3.1.0

Bcrypt class stolen from the internet, for use with Composer.

  Sources   Download

SAX-PD

The Development Requires

by Eddie Antonio Santos

24/02 2013

0.3.0

0.3.0.0

Bcrypt class stolen from the internet, for use with Composer.

  Sources   Download

SAX-PD

The Development Requires

by Eddie Antonio Santos

23/02 2013

0.1.0

0.1.0.0

Bcrypt class stolen from the internet, for use with Composer.

  Sources   Download

SAX-PD

by Eddie Antonio Santos

23/02 2013

0.2.0

0.2.0.0

Bcrypt class stolen from the internet, for use with Composer.

  Sources   Download

SAX-PD

by Eddie Antonio Santos