PHPackages                             attla/pincryp - 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. attla/pincryp

ActiveLibrary[Security](/categories/security)

attla/pincryp
=============

A layer of encryption a little too judicious.

02631PHP

Since Jan 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/attla/pincryp)[ Packagist](https://packagist.org/packages/attla/pincryp)[ RSS](/packages/attla-pincryp/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (1)

Pincryp
=======

[](#pincryp)

[![License](https://camo.githubusercontent.com/891419a00e04aa0e311068fa8a04eec92cab4f7026c76278279bf2a1da50e578/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d6c69676874677265792e737667)](LICENSE)[![Latest Stable Version](https://camo.githubusercontent.com/6cb472f627040588f5e69645335605aa53565a916758bd10c23444f2fb3c3e88/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6174746c612f70696e63727970)](https://packagist.org/packages/attla/pincryp)[![Total Downloads](https://camo.githubusercontent.com/14ec2f724e419fa1803a4f8aca9a78bdd185eae5dbe5df16598e8ab089a29a36/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6174746c612f70696e63727970)](https://packagist.org/packages/attla/pincryp)

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

[](#installation)

```
composer require attla/pincryp
```

Publish resources:

```
php artisan vendor:publish --provider="Attla\Pincryp\PincrypServiceProvider"
```

Usage
-----

[](#usage)

```
use Attla\Pincryp\Config;
use Attla\Pincryp\Factory as Pincryp;

// create config instance
$config = new Config();
$config->key = 'hic sunt dracones';
// or
$config = new Config(['key' => 'hic sunt dracones']);

// creating Pincryp instance
$pincryp = new Pincryp($config);

// encoding
$encoded = $pincryp->encode('this is something to encode..');
echo 'encoded: ' . $encoded.PHP_EOL;

$decoded = $pincryp->decode($encoded);
echo 'decoded: ' . $decoded.PHP_EOL;
```

The Pincryp can encrypt all primitive types: `array`, `stdClass`, `object`, `string`, `integer`, `float`, `bool`, and `null`.

See an example of array encryption:

```
// encoding
$encoded = $pincryp->encode([
    'name' => 'John Doe',
    'email' => 'john@example.com'
]);
echo 'encoded: ' . $encoded.PHP_EOL;

// to return a stdClass pass the second param as TRUE
$decoded = $pincryp->decode($encoded, false);
echo 'decoded: ' . $decoded.PHP_EOL;
```

### Config params

[](#config-params)

ParameterTypeDescription`key`StringEncryption secret key`entropy`IntegerEntropy length to generate unique results, set zero for always the same results`seed`String, Integer, NullAlphabet base seed to create a unique dictionaryLicense
-------

[](#license)

This package is licensed under the [MIT license](LICENSE) © [Zunq](https://zunq.com).

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/682727?v=4)[Andre Goncalves](/maintainers/nicolau)[@nicolau](https://github.com/nicolau)

---

Top Contributors

[![nicxlau](https://avatars.githubusercontent.com/u/17990891?v=4)](https://github.com/nicxlau "nicxlau (37 commits)")

---

Tags

encriptionencryptencryptionlaravellaravel-package

### Embed Badge

![Health badge](/badges/attla-pincryp/health.svg)

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

###  Alternatives

[mews/purifier

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

2.0k18.0M134](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

24772.0k35](/packages/paragonie-ecc)

PHPackages © 2026

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