PHPackages                             mazfreelance/yii2-laravel-crypt - 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. mazfreelance/yii2-laravel-crypt

AbandonedArchivedLibrary[Security](/categories/security)

mazfreelance/yii2-laravel-crypt
===============================

yii2-laravel-crypt is yii2 library compatiable with laravel

v1.1.4(4y ago)1511MITPHPPHP &gt;=5.5

Since Nov 16Pushed 4y agoCompare

[ Source](https://github.com/mazfreelance/yii2-laravel-crypt)[ Packagist](https://packagist.org/packages/mazfreelance/yii2-laravel-crypt)[ RSS](/packages/mazfreelance-yii2-laravel-crypt/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (1)Versions (6)Used By (0)

Yii2 Laravel Cryption
=====================

[](#yii2-laravel-cryption)

this is same as laravel(&gt;=5.1) encrypt and decrypt function.

Changelog
---------

[](#changelog)

For changes since the last version see the [Changelog](https://github.com/mazfreelance/yii2-laravel-crypt/blob/master/CHANGELOG.md).

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

[](#installation)

```
composer require mazfreelance/yii2-laravel-crypt -W

```

Config
------

[](#config)

add your params local

```
'encrypter' => [
    'key' = '',
    'cipher' = ''
]

```

Usage:
------

[](#usage)

#### 1) single use OR

[](#1-single-use-or)

```
use Cryption\Encrypter;

$cryption = Encrypter("yourRandomString","AES-256-CBC");
$cryption->encrypt("yourData");`

```

#### 2) this Behavior is used to encrypt data before storing it on the database and to decrypt it upon retrieval.

[](#2-this-behavior-is-used-to-encrypt-data-before-storing-it-on-the-database-and-to-decrypt-it-upon-retrieval)

- add the following code on Model class

```
public function behaviors()
{
    return [
        'encryption' => [
            'class' => '\Cryption\EncryptionBehavior',
            'attributes' => [
                'attribute1',
                'attribute2',
            ],
        ],
    ];
}

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.3% 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 ~6 days

Total

5

Last Release

1617d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2664199d6a3dadc2b99e49f463494d71556a1cea7d78e78abde761649d85aa06?d=identicon)[mazfreelance](/maintainers/mazfreelance)

---

Top Contributors

[![mazfreelance](https://avatars.githubusercontent.com/u/29052573?v=4)](https://github.com/mazfreelance "mazfreelance (12 commits)")[![xwei3752](https://avatars.githubusercontent.com/u/8140782?v=4)](https://github.com/xwei3752 "xwei3752 (1 commits)")

---

Tags

decryptionencryptionencryption-decryptionlaravelyii2-advancedyii2-extensionyii2-frameworklaravelweb serviceyii2crypt

### Embed Badge

![Health badge](/badges/mazfreelance-yii2-laravel-crypt/health.svg)

```
[![Health](https://phpackages.com/badges/mazfreelance-yii2-laravel-crypt/health.svg)](https://phpackages.com/packages/mazfreelance-yii2-laravel-crypt)
```

###  Alternatives

[tomgrohl/laravel4-php71-encrypter

Laravel 4.2 Encrypter for PHP 7.1+

42248.7k](/packages/tomgrohl-laravel4-php71-encrypter)[vlucas/pikirasa

PKI public/private RSA key encryption using the OpenSSL extension

104101.1k1](/packages/vlucas-pikirasa)[miladrahimi/phpcrypt

Encryption, decryption, and hashing tools for PHP projects

3171.5k2](/packages/miladrahimi-phpcrypt)

PHPackages © 2026

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