PHPackages                             cyphera/cyphera - 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. cyphera/cyphera

ActiveLibrary[Security](/categories/security)

cyphera/cyphera
===============

Configuration-driven data protection SDK for PHP — format-preserving encryption (FF1/FF3), data masking, and hashing.

v0.0.1-alpha.8(2mo ago)223[1 PRs](https://github.com/cyphera-labs/cyphera-php/pulls)Apache-2.0PHPPHP &gt;=8.1CI passing

Since Apr 9Pushed 3w agoCompare

[ Source](https://github.com/cyphera-labs/cyphera-php)[ Packagist](https://packagist.org/packages/cyphera/cyphera)[ Docs](https://cyphera.io)[ RSS](/packages/cyphera-cyphera/feed)WikiDiscussions main Synced 1w ago

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

cyphera
=======

[](#cyphera)

[![CI](https://github.com/cyphera-labs/cyphera-php/actions/workflows/ci.yml/badge.svg)](https://github.com/cyphera-labs/cyphera-php/actions/workflows/ci.yml)[![Security](https://github.com/cyphera-labs/cyphera-php/actions/workflows/codeql.yml/badge.svg)](https://github.com/cyphera-labs/cyphera-php/actions/workflows/codeql.yml)[![Packagist](https://camo.githubusercontent.com/a1386c5d4f2f88f4069111a71954bcdf358db2b5653f11e0812d86814374f3bb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f637970686572612f63797068657261)](https://packagist.org/packages/cyphera/cyphera)[![PHP](https://camo.githubusercontent.com/b941fe7b50abffc0c468cdaa6c48311739693b66cc0c8b8e64fb9bbe047354f7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e312532422d707572706c65)](https://www.php.net/)[![License](https://camo.githubusercontent.com/39a434c39c97856247fc55ebc90e8cc1cb9871558a37bf1bf83cbaca3be89d69/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d417061636865253230322e302d626c7565)](LICENSE)

Configuration-driven data protection SDK for PHP — format-preserving encryption (FF1/FF3), data masking, and hashing.

```
composer require cyphera/cyphera

```

Requires `ext-openssl` and `ext-gmp`.

Usage
-----

[](#usage)

```
use Cyphera\Cyphera;

// Auto-discover: checks CYPHERA_CONFIG_FILE env, ./cyphera.json, /etc/cyphera/cyphera.json
$c = Cyphera::load();

// Or load from a specific file
$c = Cyphera::fromFile('./config/cyphera.json');

// Or inline config
$c = Cyphera::fromConfig([
    'configurations' => [
        'ssn' => ['engine' => 'ff1', 'key_ref' => 'my-key', 'header' => 'T01'],
    ],
    'keys' => [
        'my-key' => ['material' => '2B7E151628AED2A6ABF7158809CF4F3C'],
    ],
]);

// Protect
$protected = $c->protect('123-45-6789', 'ssn');
// → "T01i6J-xF-07pX" (DPH-prefixed, dashes preserved)

// Access (header-based, no configuration name needed)
$accessed = $c->access($protected);
// → "123-45-6789"
```

Engines
-------

[](#engines)

EngineReversibleDescription`ff1`YesNIST SP 800-38G FF1 format-preserving encryption`ff3`YesNIST SP 800-38G Rev 1 FF3-1 format-preserving encryption`mask`NoSimple pattern masking (last4, first1, full, etc.)`hash`NoSHA-256/384/512, HMAC when key providedConfiguration File (cyphera.json)
---------------------------------

[](#configuration-file-cypherajson)

```
{
  "configurations": {
    "ssn": { "engine": "ff1", "key_ref": "my-key", "header": "T01" },
    "cc": { "engine": "ff1", "key_ref": "my-key", "header": "T02" },
    "ssn_mask": { "engine": "mask", "pattern": "last4", "header_enabled": false }
  },
  "keys": {
    "my-key": { "material": "2B7E151628AED2A6ABF7158809CF4F3C" }
  }
}
```

Cross-Language Compatible
-------------------------

[](#cross-language-compatible)

All seven SDKs produce identical output for the same inputs:

```
Input:       123-45-6789
Java:        T01i6J-xF-07pX
Rust:        T01i6J-xF-07pX
Node:        T01i6J-xF-07pX
Python:      T01i6J-xF-07pX
Go:          T01i6J-xF-07pX
.NET:        T01i6J-xF-07pX
PHP:         T01i6J-xF-07pX

```

Status
------

[](#status)

Alpha. API is unstable. Cross-language test vectors validated against Java, Rust, Node, Python, Go, and .NET implementations.

License
-------

[](#license)

Apache 2.0 — Copyright 2026 Horizon Digital Engineering LLC

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance92

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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 ~6 days

Recently: every ~0 days

Total

8

Last Release

62d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/87376207?v=4)[cyphera](/maintainers/cyphera)[@cyphera](https://github.com/cyphera)

---

Top Contributors

[![lgutschow](https://avatars.githubusercontent.com/u/16002067?v=4)](https://github.com/lgutschow "lgutschow (20 commits)")

---

Tags

cypheradata-maskingdata-protectionencryptionff1ff3format-preserving-encryptionfpenistphpencryptiondata protectionfpeff1Maskingff3format-preserving-encryption

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[phpseclib/phpseclib

PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.

5.6k465.6M1.6k](/packages/phpseclib-phpseclib)[defuse/php-encryption

Secure PHP Encryption Library

3.9k175.2M258](/packages/defuse-php-encryption)[paragonie/ciphersweet

Searchable field-level encryption library for relational databases

4691.4M24](/packages/paragonie-ciphersweet)[ass/xmlsecurity

The XmlSecurity library is written in PHP for working with XML Encryption and Signatures

955.7M35](/packages/ass-xmlsecurity)[pear/crypt_gpg

Provides an object oriented interface to the GNU Privacy Guard (GnuPG). It requires the GnuPG executable to be on the system.

974.6M12](/packages/pear-crypt-gpg)[nzo/url-encryptor-bundle

The NzoUrlEncryptorBundle is a Symfony Bundle used to Encrypt and Decrypt data and variables in the Web application or passed through URL

971.1M2](/packages/nzo-url-encryptor-bundle)

PHPackages © 2026

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