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)032MITPHPPHP ^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 3w ago

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

29

—

LowBetter than 57% of packages

Maintenance42

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

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

469d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/44118261?v=4)[Panton](/maintainers/AntonPanfilov)[@AntonPanfilov](https://github.com/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

[mews/purifier

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

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

PHP Elliptic Curve Cryptography library

24772.0k35](/packages/paragonie-ecc)

PHPackages © 2026

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