PHPackages                             hobocta/encrypt - 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. hobocta/encrypt

ActiveLibrary[Security](/categories/security)

hobocta/encrypt
===============

Easy way to use data encryption

v1.1.1(1y ago)6241MITPHPPHP ^5.3.3 || ^7.0 || ^8.0

Since Dec 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/hobocta/encrypt)[ Packagist](https://packagist.org/packages/hobocta/encrypt)[ Docs](https://github.com/hobocta/encrypt)[ RSS](/packages/hobocta-encrypt/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (6)Used By (0)

Easy way to use data encryption in php
======================================

[](#easy-way-to-use-data-encryption-in-php)

[![Build Status](https://camo.githubusercontent.com/5aa91a5f7e0d52dbd8cae9611cd00e78810116dd90f7bb66b324ba82176673cd/68747470733a2f2f7472617669732d63692e6f72672f686f626f6374612f656e63727970742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/hobocta/encrypt)[![codecov](https://camo.githubusercontent.com/99bba85322a0927fed549b41a6777e8832fc1317cf8f42939de4e6499a1880f9/68747470733a2f2f636f6465636f762e696f2f67682f686f626f6374612f656e63727970742f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/hobocta/encrypt)[![Latest Stable Version](https://camo.githubusercontent.com/e2228ef8d84999e8a69953d2a154cae1d0b7ef0cb6eadd7b57e4a6183c8b5c8c/68747470733a2f2f706f7365722e707567782e6f72672f686f626f6374612f656e63727970742f762f737461626c65)](https://packagist.org/packages/hobocta/encrypt)[![Latest Unstable Version](https://camo.githubusercontent.com/d529fdbeb0565c88077f7cd73c8802c58ca3a2e176790ebf8c8c9947f7b97061/68747470733a2f2f706f7365722e707567782e6f72672f686f626f6374612f656e63727970742f762f756e737461626c65)](https://packagist.org/packages/hobocta/encrypt)[![License](https://camo.githubusercontent.com/08322f476511b1e1be51184593b1c49b4685df781a63dc0d24a325bd38b51072/68747470733a2f2f706f7365722e707567782e6f72672f686f626f6374612f656e63727970742f6c6963656e7365)](https://packagist.org/packages/hobocta/encrypt)[![Downloads](https://camo.githubusercontent.com/b9de34411199e570f5af5def6fd22c87298ff9efcb5ba60e816cd7f9233e9fec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f686f626f6374612f656e63727970742e737667)](https://packagist.org/packages/hobocta/encrypt)

Requirements
------------

[](#requirements)

php `^5.3.3` or `^7.0` or `^8.0` with extension OpenSSL or Mcrypt

Install
-------

[](#install)

`composer require hobocta/encrypt`

Usage
-----

[](#usage)

```
use Hobocta\Encrypt\Encryptor\Fabric\EncryptorFabric;
use Hobocta\Encrypt\EncryptService;
use Hobocta\Encrypt\Stringify\Base64Stringify;

$data = 'My secret data!';

$password = '1234';

$encryptService = new EncryptService(
    (new EncryptorFabric(sha1($password)))->createEncryptor128(),
    new Base64Stringify()
);

$encrypted = $encryptService->encrypt($data); // 'fxVrDEtIb/krb8fHW6hhVDbH9VeV1Lwbs3hM35ITtc8='

$decrypted = $encryptService->decrypt($encrypted); // 'My secret data!'
```

Run simple example
------------------

[](#run-simple-example)

`php examples/simple.php` [code](examples/simple.php)

Run example with all variants
-----------------------------

[](#run-example-with-all-variants)

`php examples/all.php`

Run performance test for all variants
-------------------------------------

[](#run-performance-test-for-all-variants)

`php examples/performance.php`

Run unit tests
--------------

[](#run-unit-tests)

Make sure to install PHPUnit separately before running the tests

`phpunit`

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity70

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 ~542 days

Total

5

Last Release

544d ago

PHP version history (2 changes)v1.0.0PHP ^5.3.3 || ^7.0

v1.1.0PHP ^5.3.3 || ^7.0 || ^8.0

### Community

Maintainers

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

---

Top Contributors

[![hobocta](https://avatars.githubusercontent.com/u/711103?v=4)](https://github.com/hobocta "hobocta (118 commits)")

---

Tags

securitycryptographyencryptioncryptoaesopensslmcrypt

### Embed Badge

![Health badge](/badges/hobocta-encrypt/health.svg)

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

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

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

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

5.6k434.8M1.3k](/packages/phpseclib-phpseclib)[poly-crypto/poly-crypto

High-level cryptographic functions that are interoperable between NodeJS and PHP 7.1+

127.8k1](/packages/poly-crypto-poly-crypto)

PHPackages © 2026

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