PHPackages                             polarising/bcrypt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. polarising/bcrypt

ActiveLibrary

polarising/bcrypt
=================

Customized Bcrypt for PHP

1.0.2(9y ago)363.0k↓27%3MITPHPPHP &gt;=5.3.7

Since Nov 2Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Polarising/bcrypt)[ Packagist](https://packagist.org/packages/polarising/bcrypt)[ RSS](/packages/polarising-bcrypt/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

bcrypt
======

[](#bcrypt)

========

[![Build Status](https://camo.githubusercontent.com/5e1a699ef3a4d61324caa9401cf1cd983f85f8e148b3251d6b5eb2167cb11a71/68747470733a2f2f7472617669732d63692e6f72672f506f6c61726973696e672f6263727970742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Polarising/bcrypt)[![Latest Stable Version](https://camo.githubusercontent.com/30a6519cacc57e5d6b1b3d3347520b6f6533bf61070b7ae905f74a9ed1d52569/68747470733a2f2f706f7365722e707567782e6f72672f706f6c61726973696e672f6263727970742f762f737461626c65)](https://packagist.org/packages/polarising/bcrypt)[![Latest Unstable Version](https://camo.githubusercontent.com/9ac7e908c984f97e216536c3744637cf0677bfe700b9d704af1ef5a575dd11ee/68747470733a2f2f706f7365722e707567782e6f72672f706f6c61726973696e672f6263727970742f762f756e737461626c65)](https://packagist.org/packages/polarising/bcrypt)[![Total Downloads](https://camo.githubusercontent.com/fe4992f20e468cdcdd3ca6559f53b1b81d99ea98835577ce44559a3ef47ba8be/68747470733a2f2f706f7365722e707567782e6f72672f706f6c61726973696e672f6263727970742f646f776e6c6f616473)](https://packagist.org/packages/polarising/bcrypt)[![License](https://camo.githubusercontent.com/0ae8314c59ab41246fb038cf37f656f083befdcd67c8f0949c490f2b83f60a07/68747470733a2f2f706f7365722e707567782e6f72672f706f6c61726973696e672f6263727970742f6c6963656e7365)](https://packagist.org/packages/polarising/bcrypt)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/97927a6f5f71adbc7fb93de13ca2b778b48bd492685e5def45a75c139d4e5e0e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f506f6c61726973696e672f6263727970742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Polarising/bcrypt/?branch=master)

Instead of using PHP hash password API, encrypt plain text by using Bcrypt algorithm, and make sure it's compatible with Bcrypt in other programming languages, like Java, python.

Installing Bcrypt
-----------------

[](#installing-bcrypt)

The recommended way to install Bcrypt is through [Composer](http://getcomposer.org).

```
# Install Composer
curl -sS https://getcomposer.org/installer | php
```

Next, run the Composer command to install the latest stable version of Bcrypt:

```
php composer.phar require polarising/bcrypt
```

After installing, you need to require Composer's autoloader:

```
require 'vendor/autoload.php';
```

You can then later update Bcrypt using composer:

```
composer.phar update
```

Quick Examples
--------------

[](#quick-examples)

Encrypt Plaintext, Verify Plaintext and Ciphertext
==================================================

[](#encrypt-plaintext-verify-plaintext-and-ciphertext)

```
