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 1mo ago

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 59% 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

897d 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

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/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.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/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)
