PHPackages                             krmgns/cryptee - 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. krmgns/cryptee

ActiveLibrary[Security](/categories/security)

krmgns/cryptee
==============

Pretty easy, fast and secure two-way encryption with PHP.

3.0.1(2y ago)61842Apache-2.0PHPPHP &gt;=7.4

Since Feb 19Pushed 2y ago3 watchersCompare

[ Source](https://github.com/krmgns/cryptee)[ Packagist](https://packagist.org/packages/krmgns/cryptee)[ Docs](https://github.com/krmgns/cryptee)[ RSS](/packages/krmgns-cryptee/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (9)Used By (0)

For Cryptee/2.0, PHP/7.4 or newer version is required, but older Cryptee versions (1.0, 1.1, 1.2) work with older PHP versions as well.

You can install it via [Composer](//getcomposer.org) using the command below on console:

`composer require krmgns/cryptee`

### Usage

[](#usage)

```
use Cryptee\Cryptee;

// Keep this key in save!
$key = '4]%gmHo"e:]*hR(NQ?B...';
$str = 'Lorem ipsum dolor.';

$c = new Cryptee($key);
// Or hex way.
// $c = new Cryptee($key, Cryptee::HEX);

$crypted = $c->crypt($str);
$encoded = $c->encode($str);
$decoded = $c->decode($encoded);

printf("Crypted String: %s\n", $crypted);
printf("Encoded String: %s\n", $encoded);
printf("Decoded String: %s\n", $decoded);

// Crypted String: X�/����;���-6�[��
// Encoded String: WJAv2/6x5Du/5IXjLTakW+jr
// Decoded String: Lorem ipsum dolor.
```

### Using Different Keys

[](#using-different-keys)

```
// Keep these keys in save!
const FOO_KEY = 'z:W;[*l>Eq.h"t)cs#XhU\+!=S]#q)\yG-...';
const BAR_KEY = 'SNz6@b*/k(iw!plOVeTBWxpL[1$;la|kb2...';

$cFoo = new Cryptee(FOO_KEY);
$cBar = new Cryptee(BAR_KEY);
```

### Generating Keys

[](#generating-keys)

You can generate new keys calling `Cryptee::generateKey()` method with/without `$length` argument as key length. Default length is 128.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity68

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

Every ~413 days

Recently: every ~464 days

Total

8

Last Release

844d ago

Major Versions

1.2.1 → 2.0.02022-10-19

2.0.1 → 3.0.02022-10-22

PHP version history (4 changes)v1.0PHP &gt;=5.3.0

1.2.0PHP ^5.4

2.0.0PHP ^7.4

2.0.1PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/70f9bcd96f92716abf051f22448ab55da368441dbc3e1d96bcebd70e132dcc59?d=identicon)[krmgns](/maintainers/krmgns)

---

Top Contributors

[![krmgns](https://avatars.githubusercontent.com/u/1508306?v=4)](https://github.com/krmgns "krmgns (60 commits)")

---

Tags

encryptioncrypteetwo-way encryption

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/krmgns-cryptee/health.svg)

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

###  Alternatives

[phpseclib/phpseclib

PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.

5.6k434.8M1.3k](/packages/phpseclib-phpseclib)[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[paragonie/ciphersweet

Searchable field-level encryption library for relational databases

4641.2M21](/packages/paragonie-ciphersweet)[ass/xmlsecurity

The XmlSecurity library is written in PHP for working with XML Encryption and Signatures

955.6M30](/packages/ass-xmlsecurity)[pear/crypt_gpg

Provides an object oriented interface to the GNU Privacy Guard (GnuPG). It requires the GnuPG executable to be on the system.

954.4M10](/packages/pear-crypt-gpg)[soved/laravel-gdpr

GDPR compliance with ease

299127.5k2](/packages/soved-laravel-gdpr)

PHPackages © 2026

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