PHPackages                             smolowik/propel-behavior-mysql-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. smolowik/propel-behavior-mysql-encryption

ActivePropel-behavior[Security](/categories/security)

smolowik/propel-behavior-mysql-encryption
=========================================

Behavior which allows you to encrypt columns using mysql

1.0.0(9y ago)044MITPHPPHP ^7

Since Feb 22Pushed 9y ago1 watchersCompare

[ Source](https://github.com/smolowik/propel-behavior-mysql-encryption)[ Packagist](https://packagist.org/packages/smolowik/propel-behavior-mysql-encryption)[ RSS](/packages/smolowik-propel-behavior-mysql-encryption/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

\##mysql\_encryption behavior for propel 2.x This behavior is written for propel 2.x and it uses mysql functions AES\_ENCRYPT and AES\_DECRYPT for encryption.

Instalation
-----------

[](#instalation)

```
composer require smolowik/propel-behavior-mysql-encryption

```

\##How to use

First you need to define the encryption key:

```
Smolowik\Propel\Passphrase::createInstance("YOUR_SECRET_KEY");
```

Then, add the behavior to the table:

```

```

In this part you define which columns should be encrypted. In our example, this columns: first\_name, last\_name and email.

```

```

After building the model and update the database schema, you should be able to use encrypted columns as with any other in the table. I use this behavior to getting the list (paginate) with searching and sorting. I use it also to read and write individual rows from the database. If you want to use it in a more sophisticated way, you should thoroughly test it yourself.

\##SpeedTest

Test was made on Author table with fields id, first\_name, last\_name and email. Fields first\_name, last\_name and email are encrypted. The table was 33097 lines.

With no encryption:

- insert (1000 rows) **546ms**
- findByFirstName (10 rows) **37ms**
- paginate (page 20 with 50 items and orderedByFirstName) **31ms**

With encryption with mysql\_encryption behavior

- insert (1000 rows) **584ms**
- findByFirstName (10 rows) **128ms**
- paginate (page 20 with 50 items and orderedByFirstName) **139ms**

With encryption with uwdoem/encryption behavior

- insert (1000 rows) **577ms**
- findByFirstName (10 rows) **not available**
- paginate (page 20 with 50 items and orderedByFirstName) **not available**

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3366d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c99f679a3a687fe51e21d3d84c02cd8343e5e209df7b9022bdaf9939908df9b6?d=identicon)[smolowik](/maintainers/smolowik)

---

Top Contributors

[![smolowik](https://avatars.githubusercontent.com/u/8179206?v=4)](https://github.com/smolowik "smolowik (9 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/smolowik-propel-behavior-mysql-encryption/health.svg)

```
[![Health](https://phpackages.com/badges/smolowik-propel-behavior-mysql-encryption/health.svg)](https://phpackages.com/packages/smolowik-propel-behavior-mysql-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)
