PHPackages                             byflav/yii2-phpass - 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. [Security](/categories/security)
4. /
5. byflav/yii2-phpass

ActiveYii2-extension[Security](/categories/security)

byflav/yii2-phpass
==================

integrate http://www.openwall.com/phpass/ in yii2

22701PHP

Since Sep 16Pushed 9y agoCompare

[ Source](https://github.com/byflav/yii2-phpass)[ Packagist](https://packagist.org/packages/byflav/yii2-phpass)[ RSS](/packages/byflav-yii2-phpass/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

openwall PasswordHash by yii2
=============================

[](#openwall-passwordhash-by-yii2)

Portable PHP password hashing framework in yii2

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist byflav/yii2-phpass "*"

```

or add

```
"byflav/yii2-phpass": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

1 setup component in config file app:

```
	'components' => [
		'security' => [
			'class' => 'byflav\phpass\Security',
			'iterationCountLog2' => 8,     // integer > 3 and < 31 ; default 8;
			'portableHashes' 	 => false, // boolean; default false;
		],
	]

```

2 example use:

```
	#create hash:
	$hash = Yii::$app->getSecurity()->generatePasswordHash('lorem ipsum');

	#validate hash: (return boolean)
	return Yii::$app->getSecurity()->validatePassword('lorem ipsum', $hash);

```

```

```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22008842?v=4)[byflav](/maintainers/byflav)[@byflav](https://github.com/byflav)

### Embed Badge

![Health badge](/badges/byflav-yii2-phpass/health.svg)

```
[![Health](https://phpackages.com/badges/byflav-yii2-phpass/health.svg)](https://phpackages.com/packages/byflav-yii2-phpass)
```

###  Alternatives

[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k18.0M138](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

24772.0k36](/packages/paragonie-ecc)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
