PHPackages                             commandstring/encrypt - 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. commandstring/encrypt

AbandonedArchivedLibrary[Security](/categories/security)

commandstring/encrypt
=====================

A simpler way to encrypt data

v3.0.1(2y ago)27321MITPHPPHP &gt;=8.1

Since Aug 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/CommandString/Encrypt)[ Packagist](https://packagist.org/packages/commandstring/encrypt)[ RSS](/packages/commandstring-encrypt/feed)WikiDiscussions main Synced today

READMEChangelog (5)DependenciesVersions (7)Used By (1)

[CommandString/Encrypt](https://packagist.org/packages/commandstring/encrypt) - A simpler way to encrypt data in PHP
====================================================================================================================

[](#commandstringencrypt---a-simpler-way-to-encrypt-data-in-php)

### Install with Composer using `composer require CommandString/Encrypt`

[](#install-with-composer-using-composer-require-commandstringencrypt)

Requirements
------------

[](#requirements)

- PHP &gt;=8.0
- Basic understanding of PHP OOP
- Composer 2

Basic Usage
-----------

[](#basic-usage)

```
require __DIR__"/vendor/autoload.php";
use CommandString/Encrypt/Encryption;

#                            v >=32 character string            v Encryption method #
$encryptor = new Encryption("MZCdg02STLzrsj05KE3SIL62SSlh2Ij", "AES-256-CTR");

$encryptedString = $encryptor->encrypt("Hello World"); // 2aPpxvxiUc3W3TCK:xJmkuSYDpOIOX9k=
$decryptedString = $encryptor->decrypt($encryptedString"); // Hello World
```

Comparing CommandString/Encrypt to regular encrypting
-----------------------------------------------------

[](#comparing-commandstringencrypt-to-regular-encrypting)

### CommandString/Encrypt

[](#commandstringencrypt)

```
// config.php
require __DIR__"/vendor/autoload.php";
use CommandString/Encrypt/Encryption;

$encryptor = new Encryption("MZCdg02STLzrsj05KE3SIL62SSlh2Ij", "AES-256-CTR");
// ...

// somepage.php
require_once "config.php";

$var = /* some value that needs encrypted */;
$encryptedVar = $encryptor->encrypt($var);
// ...

// someotherpage.php
require_once "config.php";

$encryptedVar = /* retrieved encryptedVar from somepage.php */;
$decryptedVar = $encryptor->decrypt($encryptedVar);
//...
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 90.9% 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 ~93 days

Recently: every ~116 days

Total

6

Last Release

943d ago

Major Versions

v1.0.1 → v2.0.12022-10-29

v2.0.2 → v3.0.02023-12-02

PHP version history (2 changes)v1.0.0PHP &gt;=8.0

v2.0.1PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/c1dc8515485fa64088fdfa03dd0f487d507dc1516824c31be2626a6ee25244dd?d=identicon)[command\_string](/maintainers/command_string)

---

Top Contributors

[![CommandString](https://avatars.githubusercontent.com/u/44886996?v=4)](https://github.com/CommandString "CommandString (10 commits)")[![freezemage0](https://avatars.githubusercontent.com/u/48737675?v=4)](https://github.com/freezemage0 "freezemage0 (1 commits)")

### Embed Badge

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

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

###  Alternatives

[mews/purifier

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

2.0k18.7M143](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

24820.0k37](/packages/paragonie-ecc)

PHPackages © 2026

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