PHPackages                             anton-panfilov/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. anton-panfilov/cryptographer

ActiveLibrary[Security](/categories/security)

anton-panfilov/cryptographer
============================

1.0.0(1y ago)041MITPHPPHP ^8.3

Since Dec 31Pushed 1y ago1 watchersCompare

[ Source](https://github.com/anton-panfilov/cryptographer)[ Packagist](https://packagist.org/packages/anton-panfilov/cryptographer)[ Docs](https://github.com/anton-panfilov/cryptographer)[ RSS](/packages/anton-panfilov-cryptographer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)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 60% of packages

Maintenance42

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community8

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

493d 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 (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/anton-panfilov-cryptographer/health.svg)

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

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

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

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

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

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

2.0k16.7M112](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M117](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)[enlightn/security-checker

A PHP dependency vulnerabilities scanner based on the Security Advisories Database.

33732.2M110](/packages/enlightn-security-checker)

PHPackages © 2026

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