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)0113.1k↓16.4%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 2w 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

31

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

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

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

[phpids/phpids

PHPIDS (PHP-Intrusion Detection System) is a simple to use, well structured, fast and state-of-the-art security layer for your PHP based web application

791150.0k2](/packages/phpids-phpids)[paragonie/ecc

PHP Elliptic Curve Cryptography library

25866.3k44](/packages/paragonie-ecc)[sansec/magento2-module-shield

15218.6k](/packages/sansec-magento2-module-shield)[nicobleiler/php-passphrase

Passphrase generator with Laravel integration, inspired by Bitwarden. Uses the EFF long word list by default with support for custom wordlists.

4912.6k](/packages/nicobleiler-php-passphrase)[dwgebler/encryption

Encryption wrapper for PHP using libsodium — simple API for symmetric and asymmetric encryption, password hashing, digital signing, and message authentication.

317.5k](/packages/dwgebler-encryption)

PHPackages © 2026

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