PHPackages                             plectrum/encryption - 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. plectrum/encryption

ActiveLibrary[Security](/categories/security)

plectrum/encryption
===================

Encryption service library

1.0.3(2y ago)022MITPHPPHP ^7.4|^8.0

Since Sep 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/gannza/encryption)[ Packagist](https://packagist.org/packages/plectrum/encryption)[ RSS](/packages/plectrum-encryption/feed)WikiDiscussions master Synced 1w ago

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

Encryption Service Library
==========================

[](#encryption-service-library)

Encryption Service is a PHP library that provides encryption and decryption functionalities using AES-256-CBC cipher. It allows you to securely encrypt sensitive data using a secret key and retrieve the original data through decryption.

Main features:

- Encryption of data using AES-256-CBC cipher
- Decryption of encrypted data
- Input validation to ensure required variables are provided
- Error handling for decryption failures and invalid data

Installation
------------

[](#installation)

Install the library using composer:

```
composer require plectrum/encryption
```

Usage
-----

[](#usage)

```
require __DIR__ . '/vendor/autoload.php';

use Plectrum\Encryption\EncryptionService;

$encryption = new EncryptionService();

$data = array('id'=>1);
$secretKey='Your Secret Key';

//for encryption

$encryptedData = $encryption->encrypt($data,$secretKey);
echo $encryptedData;

//for decryption
$decryptedData = $encryption->decrypt($encryptedData,$secretKey);
 print_r($decryptedData);

Make sure to replace `data` and `secretKey` with the appropriate values for encryption and decryption.
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97% 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 ~218 days

Total

4

Last Release

1036d ago

PHP version history (2 changes)1.0.0PHP ^7.4.0

1.0.2PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d8b56c24bfcfd32624ed0645f8bf25f2177c7d10be63501e5e220fbca5982ca?d=identicon)[respinho2014](/maintainers/respinho2014)

---

Top Contributors

[![gannza](https://avatars.githubusercontent.com/u/15227975?v=4)](https://github.com/gannza "gannza (32 commits)")[![agavitalis](https://avatars.githubusercontent.com/u/19613305?v=4)](https://github.com/agavitalis "agavitalis (1 commits)")

### Embed Badge

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

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

###  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)[illuminate/encryption

The Illuminate Encryption package.

9229.7M280](/packages/illuminate-encryption)

PHPackages © 2026

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