PHPackages                             driehle/php-crypt-md5 - 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. driehle/php-crypt-md5

ActiveLibrary[Security](/categories/security)

driehle/php-crypt-md5
=====================

A pure PHP implementation of an MD5-hashsum-based implementation of the crypt routine, which can be used to generate hashs for Apache's passwd files

v3.5.1(1y ago)63.4k↓67.3%11GPL-3.0+PHPPHP &gt;=8.1 &lt;8.5CI failing

Since Jun 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/driehle/php-crypt-md5)[ Packagist](https://packagist.org/packages/driehle/php-crypt-md5)[ Docs](https://github.com/driehle/php-crypt-md5)[ RSS](/packages/driehle-php-crypt-md5/feed)WikiDiscussions main Synced yesterday

READMEChangelog (7)Dependencies (3)Versions (9)Used By (1)

PHP crypt-md5
=============

[](#php-crypt-md5)

A pure PHP implementation of an MD5-hashsum-based implementation of the crypt routine, which can be used to generate hashs for Apache's passwd files.

[![Build Status](https://github.com/driehle/php-crypt-md5/workflows/Continuous%20Integration/badge.svg)](https://github.com/driehle/php-crypt-md5/actions?query=workflow%3A%22Continuous+Integration%22)[![Latest Stable Version](https://camo.githubusercontent.com/6d85c84630c83257cbdd5ef77e313ba5dbc462fba6c6d12a46f52cb4b581681c/68747470733a2f2f706f7365722e707567782e6f72672f64726965686c652f7068702d63727970742d6d64352f762f737461626c65)](https://packagist.org/packages/driehle/php-crypt-md5)[![Total Downloads](https://camo.githubusercontent.com/f95657c2d66dcd4b8df37d10c40983a04531bb45f56a16b2090abe6c475e11e1/68747470733a2f2f706f7365722e707567782e6f72672f64726965686c652f7068702d63727970742d6d64352f646f776e6c6f616473)](https://packagist.org/packages/driehle/php-crypt-md5)[![Latest Unstable Version](https://camo.githubusercontent.com/0ba303223c74d94482de14215bbbf09f71db8db9fc1b95c7ea38814785d99fe8/68747470733a2f2f706f7365722e707567782e6f72672f64726965686c652f7068702d63727970742d6d64352f762f756e737461626c65)](https://packagist.org/packages/driehle/php-crypt-md5)[![License](https://camo.githubusercontent.com/c5fb3e7db56c40e92edd9eaae1169c5ccc370268e63a4dd82128516a24089311/68747470733a2f2f706f7365722e707567782e6f72672f64726965686c652f7068702d63727970742d6d64352f6c6963656e7365)](https://packagist.org/packages/driehle/php-crypt-md5)

Description
-----------

[](#description)

unix\_md5\_crypt() provides a crypt()-compatible interface to the rather new MD5-based crypt() function found in modern operating systems. It's based on the implementation found on FreeBSD 2.2.\[56\]-RELEASE and contains the following license in it:

```
"THE BEER-WARE LICENSE" (Revision 42):
 wrote this file.  As long as you retain this notice you
can do whatever you want with this stuff. If we meet some day, and you think
this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp

```

apache\_md5\_crypt() provides a function compatible with Apache's .htpasswd files. This was contributed by Bryan Hart ().

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

[](#installation)

The latest version of this package can be installed via Composer:

```
composer require driehle/php-crypt-md5

```

All available versions can be found under .

Usage
-----

[](#usage)

```
$cryptedpassword = Md5Crypt::unix   ($password [, $salt [, $magicstring ]);
$apachepassword  = Md5Crypt::apache ($password [, $salt]);

```

Authors
-------

[](#authors)

- Dennis Riehle
- Fabian Steiner  (thanks for bugfixing!)
- Jörg Reinholz  (thanks for bugfixing!)

Other implementations this one is based on:

- perl's Crypt::PasswdMD5 by Luis Munoz ()
- phyton's md5crypt.py by Michal Wallace
- /usr/src/libcrypt/crypt.c from FreeBSD 2.2.5-RELEASE

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 100% 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 ~600 days

Recently: every ~275 days

Total

8

Last Release

550d ago

Major Versions

v2.0.0 → v3.0.02020-04-14

PHP version history (7 changes)v2.0.0PHP &gt;=5.0

v3.0.0PHP &gt;=7.0

v3.1.0PHP ^7.2 || ~8.0.0

v3.2.0PHP ^7.3 || ~8.0.0 || ~8.1.0

v3.3.0PHP &gt;=7.4 &lt;8.3

v3.4.0PHP &gt;=7.4 &lt;8.4

v3.5.0PHP &gt;=8.1 &lt;8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/21a7c88e5b3afb07c863fee44d83920e51af5f26b9f363ad1bca65bdc250f9ea?d=identicon)[driehle](/maintainers/driehle)

---

Top Contributors

[![driehle](https://avatars.githubusercontent.com/u/1586788?v=4)](https://github.com/driehle "driehle (33 commits)")

---

Tags

cryptMD5apachehtaccesspasswd

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/driehle-php-crypt-md5/health.svg)

```
[![Health](https://phpackages.com/badges/driehle-php-crypt-md5/health.svg)](https://phpackages.com/packages/driehle-php-crypt-md5)
```

###  Alternatives

[passwordlib/passwordlib

A Password Hashing Library

377223.2k7](/packages/passwordlib-passwordlib)[bordoni/phpass

Portable PHP password hashing framework

254.7M30](/packages/bordoni-phpass)[vlucas/pikirasa

PKI public/private RSA key encryption using the OpenSSL extension

107105.0k1](/packages/vlucas-pikirasa)[xxtea/xxtea

XXTEA is a fast and secure encryption algorithm. This is a XXTEA library for PHP.

11343.0k](/packages/xxtea-xxtea)[aplus/crypto

Aplus Framework Crypto Library

171.6M1](/packages/aplus-crypto)[miladrahimi/phpcrypt

Encryption, decryption, and hashing tools for PHP projects

3275.4k2](/packages/miladrahimi-phpcrypt)

PHPackages © 2026

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