PHPackages                             ap-lib/cryptographer - 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. ap-lib/cryptographer

ActiveLibrary[Security](/categories/security)

ap-lib/cryptographer
====================

1.0.0(1y ago)031MITPHPPHP ^8.3

Since Mar 12Pushed 1y agoCompare

[ Source](https://github.com/ap-lib/cryptographer)[ Packagist](https://packagist.org/packages/ap-lib/cryptographer)[ Docs](https://github.com/ap-lib/cryptographer)[ RSS](/packages/ap-lib-cryptographer/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

The Cryptographer
=================

[](#the-cryptographer)

Generate the passphrase once and save it securely in your configuration
-----------------------------------------------------------------------

[](#generate-the-passphrase-once-and-save-it-securely-in-your-configuration)

> **IMPORTANT:** Ensure this passphrase is stored in a secure location (e.g., environment variables, secrets manager)

### PHP:

[](#php)

```
$algo       = "aes-256-cfb";
$key_length = openssl_cipher_key_length();
$passphrase = openssl_random_pseudo_bytes($key_length);

// if you're planing to save this to the environment, better to make base64
$passphrase_base64 = base64_encode($passphrase);
```

### Bash:

[](#bash)

```
echo $(openssl rand -base64 32)
```

Use cases:
----------

[](#use-cases)

AlgorithmIntegrity CheckOverheadUsage Example[**AES-256-GCM**](docs%2Faes-256-gcm.md)✅ Yes16-28 bytes, IV 12 bytes + Tag 4-12 bytesEncrypting sensitive messages where data integrity is critical, e.g., API tokens.
Storing sensitive configuration data with integrity protection.
Optional authenticated additional data (AAD), not included in ciphertext but verified.[**AES-256-CFB**](docs%2Faes-256-cfb.md)❌ No16 bytes, IV onlyStreaming data encryption where low latency is required, e.g., video streaming.

###  Health Score

31

—

LowBetter than 71% of packages

Maintenance49

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

375d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1215fe5ecc9ba0ab1c730d3c992125cf6ebf460562e66be71ebae127789d465a?d=identicon)[AntonPanfilov](/maintainers/AntonPanfilov)

---

Top Contributors

[![anton-panfilov](https://avatars.githubusercontent.com/u/1083546?v=4)](https://github.com/anton-panfilov "anton-panfilov (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ap-lib-cryptographer/health.svg)

```
[![Health](https://phpackages.com/badges/ap-lib-cryptographer/health.svg)](https://phpackages.com/packages/ap-lib-cryptographer)
```

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k158.4M190](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k95.2M5.7k](/packages/roave-security-advisories)[ircmaxell/password-compat

A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password\_hash

2.2k56.3M111](/packages/ircmaxell-password-compat)[mews/purifier

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

2.0k16.1M95](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41176.1M104](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86816.9M54](/packages/bjeavons-zxcvbn-php)

PHPackages © 2026

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