PHPackages                             aalaap/hashapass - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. aalaap/hashapass

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

aalaap/hashapass
================

A hashed password generator, returning passwords identical to Hashapass.com.

1.0.6(10y ago)2471WTFPLPHP

Since Jun 2Pushed 10y ago1 watchersCompare

[ Source](https://github.com/aalaap/Hashapass)[ Packagist](https://packagist.org/packages/aalaap/hashapass)[ RSS](/packages/aalaap-hashapass/feed)WikiDiscussions master Synced 4w ago

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

Hashapass
---------

[](#hashapass)

[![Build Status](https://camo.githubusercontent.com/df58305ea4693438ae3471ef8f223d867f8fd18e383201625ad013e19f3833ee/68747470733a2f2f7472617669732d63692e6f72672f61616c6161702f4861736861706173732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/aalaap/Hashapass)

[![Join the chat at https://gitter.im/aalaap/Hashapass](https://camo.githubusercontent.com/e51781a5b3566ec8fa1fb474dde3b45ce8b049398533cfd2d45d7a7f6e3b023e/68747470733a2f2f6261646765732e6769747465722e696d2f61616c6161702f4861736861706173732e737667)](https://gitter.im/aalaap/Hashapass?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Hashapass is a library that generates unique and secure passwords, which are a hashed combination of a master password and a variable parameter.

The algorithm is based on a Base64 encode of the HMAC\_SHA1 of the provided master password and parameter values.

Simple Usage
------------

[](#simple-usage)

```
use Aalaap\Hashapass\Hashapass;

$hashapass = new Hashapass();
echo $hashapass->generate('master', 'parameter');

```

Motivation
----------

[](#motivation)

I use Hashapass extensively to generate unique passwords for all my accounts. I need it at different places, so I've made a JavaScript bookmarklet, a Windows app and, now, a PHP package.

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

[](#installation)

Install using Composer.

```
composer require aalaap/Hashapass

```

Advanced Usage
--------------

[](#advanced-usage)

The package has one main method:

```
$hashapass->generate($master_password, $parameter);

```

By default, it will return a Hashapass-compatible 8-character password. To get a more secure 16-character password (or longer), simply specify the length:

```
$hashapass->generate($master_password, $parameter, 16);

```

Note that the maximum possible length is 40, as the algoritm is limited to the length of the generated HMAC\_SHA1.

Tests
-----

[](#tests)

Hashapass has been tested in PHP 5.4 through PHP 7 and HHVM. If you want to run the tests, run:

```
vendor/bin/phpunit

```

Contributors
------------

[](#contributors)

Fork it, work on it, send a PR.

License
-------

[](#license)

Hashapass is licensed under WTFPL. Do whatever you want with it.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 91.7% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~0 days

Total

7

Last Release

3681d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/79404?v=4)[Aalaap Ghag](/maintainers/aalaap)[@aalaap](https://github.com/aalaap)

---

Top Contributors

[![aalaap](https://avatars.githubusercontent.com/u/79404?v=4)](https://github.com/aalaap "aalaap (11 commits)")[![gitter-badger](https://avatars.githubusercontent.com/u/8518239?v=4)](https://github.com/gitter-badger "gitter-badger (1 commits)")

---

Tags

hashapass

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aalaap-hashapass/health.svg)

```
[![Health](https://phpackages.com/badges/aalaap-hashapass/health.svg)](https://phpackages.com/packages/aalaap-hashapass)
```

PHPackages © 2026

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