PHPackages                             pensiero/php-openssl-cryptor - 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. pensiero/php-openssl-cryptor

ActiveLibrary[Security](/categories/security)

pensiero/php-openssl-cryptor
============================

Simple to use class for encrypting/decrypting using the PHP Openssl library.

v0.1.0(8y ago)0106.9k↓22.5%2MITPHPPHP &gt;=5.6

Since Dec 30Pushed 8y agoCompare

[ Source](https://github.com/pensiero/php-openssl-cryptor)[ Packagist](https://packagist.org/packages/pensiero/php-openssl-cryptor)[ RSS](/packages/pensiero-php-openssl-cryptor/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

php-openssl-cryptor
===================

[](#php-openssl-cryptor)

Simple to use class for encrypting/decrypting using the PHP Openssl library.

Description
-----------

[](#description)

The Cryptor class supports arbitrary encryption and key hashing algorithms, along with raw, base64 and hex encoding of the encrypted data. Static convenience methods are provided for the default of AES, but a cryptor instance can be used for more flexibility. The default uses aes-256-ctr to avoid the need for padding and the related issues. Unfortunately GCM cannot be used as the PHP openssl module does not provide a way to retrieve the GCM tag. This is proposed to be remedied in PHP 7.1 when associated data can be retrieved.

Install
-------

[](#install)

Require this library through composer:

```
composer require pensiero/php-openssl-cryptor

```

Example
-------

[](#example)

```
use OpensslCryptor\Cryptor;

$data = 'Good things come in small packages.';
$key = '9901:io=[602vV03&Whb>9J&M~Oq';

$encrypted = Cryptor::Encrypt($data, $key);

echo "'$data' (" . strlen($data) . ") => '$encrypted'\n\n";

$decrypted = Cryptor::Decrypt($encrypted, $key);

echo "'$encrypted' => '$decrypted' (" . strlen($decrypted) . ")\n";
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

3108d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2010696?v=4)[Oscar Fanelli](/maintainers/pensiero)[@pensiero](https://github.com/pensiero)

---

Top Contributors

[![pensiero](https://avatars.githubusercontent.com/u/2010696?v=4)](https://github.com/pensiero "pensiero (8 commits)")[![nickion](https://avatars.githubusercontent.com/u/19203867?v=4)](https://github.com/nickion "nickion (6 commits)")[![enfoqueNativo](https://avatars.githubusercontent.com/u/12297079?v=4)](https://github.com/enfoqueNativo "enfoqueNativo (3 commits)")[![NoMan2000](https://avatars.githubusercontent.com/u/812215?v=4)](https://github.com/NoMan2000 "NoMan2000 (1 commits)")

---

Tags

decryptionencryptionopensslsymmetric-cryptographysymmetric-encryption-algorithm

### Embed Badge

![Health badge](/badges/pensiero-php-openssl-cryptor/health.svg)

```
[![Health](https://phpackages.com/badges/pensiero-php-openssl-cryptor/health.svg)](https://phpackages.com/packages/pensiero-php-openssl-cryptor)
```

###  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)
