PHPackages                             district5/mondoc-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. [Database &amp; ORM](/categories/database)
4. /
5. district5/mondoc-encryption

ActiveLibrary[Database &amp; ORM](/categories/database)

district5/mondoc-encryption
===========================

Mondoc encryption provides the encrypt/decrypt functionality for Mondoc.

1.0.2(1y ago)0101mitPHPPHP &gt;=8.2.0CI passing

Since May 16Pushed 1y agoCompare

[ Source](https://github.com/district-5/php-mondoc-encryption)[ Packagist](https://packagist.org/packages/district5/mondoc-encryption)[ Docs](https://github.com/district-5/php-mondoc-encryption)[ RSS](/packages/district5-mondoc-encryption/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (1)

Mondoc Encryption, by District5
===============================

[](#mondoc-encryption-by-district5)

[![CI](https://github.com/district-5/php-mondoc-encryption/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/district-5/php-mondoc-encryption/actions)[![Latest Stable Version](https://camo.githubusercontent.com/cd7e87c5afe0a01f36dac67402beb2430fdbd1920a1a0fb9b17984923e47370a/687474703a2f2f706f7365722e707567782e6f72672f6469737472696374352f6d6f6e646f632d656e6372797074696f6e2f76)](https://packagist.org/packages/district5/mondoc-encryption)[![PHP Version Require](https://camo.githubusercontent.com/ea3d7ad2f8bfc2fc35ad7bcdf7bfabc821c6d66c7750b182336ae60bd289f45d/687474703a2f2f706f7365722e707567782e6f72672f6469737472696374352f6d6f6e646f632d656e6372797074696f6e2f726571756972652f706870)](https://packagist.org/packages/district5/mondoc-encryption)[![Codecov](https://camo.githubusercontent.com/8e730c2d6f9980f2ed6630bf070f60e66d4adc359c19d9f6999aeb1cc29d9d98/68747470733a2f2f636f6465636f762e696f2f67682f64697374726963742d352f7068702d6d6f6e646f632d656e6372797074696f6e2f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/district-5/php-mondoc-encryption)

[![FOSSA Status](https://camo.githubusercontent.com/e053c5d6cfa99a27803e247e496d8a8e89389aa206dc658fac55268cf12f7a88/68747470733a2f2f6170702e666f7373612e636f6d2f6170692f70726f6a656374732f6769742532426769746875622e636f6d25324664697374726963742d352532467068702d6d6f6e646f632d656e6372797074696f6e2e7376673f747970653d736d616c6c)](https://app.fossa.com/projects/git%2Bgithub.com%2Fdistrict-5%2Fphp-mondoc-encryption?ref=badge_small)

Provides the encryption function to Mondoc
------------------------------------------

[](#provides-the-encryption-function-to-mondoc)

### Installing with composer

[](#installing-with-composer)

Mondoc Encryption is used by, and leverages functionality from, the Mondoc library. You will need to install Mondoc in order to use Mondoc Encryption.

```
composer require district5/mondoc

```

### Documentation...

[](#documentation)

All documentation for Mondoc Encryption, Mondoc, and Mondoc Builder are available at [mondoc.district5.dev](https://mondoc.district5.dev).

> #### Common topics...
>
> [](#common-topics)
>
> - Getting started with encryption: [mondoc.district5.dev/documentation/model/field-encryption](https://mondoc.district5.dev/documentation/model/field-encryption)

### Testing

[](#testing)

You can run PHPUnit against the library by running `composer install` and then running `./vendor/bin/phpunit`

### Creating a new encryption adapter

[](#creating-a-new-encryption-adapter)

To create a new encryption adapter, you need to implement the `EncryptionAdapterInterface` interface, which requires the following methods:

```
    /**
     * Encrypt the field value.
     */
    public function encrypt(string $field, mixed $value): mixed;

    /**
     * Decrypt the field value.
     */
    public function decrypt(string $field, mixed $value): mixed;
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance50

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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

367d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5de4b9a90eadf6b595e1b5efc802683f2358da5661c616820b90c922f8aa8e05?d=identicon)[rogerthomas84](/maintainers/rogerthomas84)

---

Top Contributors

[![rogerthomas84](https://avatars.githubusercontent.com/u/350232?v=4)](https://github.com/rogerthomas84 "rogerthomas84 (13 commits)")

---

Tags

encryptionodmmongodbmongodistrict5mondoc

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/district5-mondoc-encryption/health.svg)

```
[![Health](https://phpackages.com/badges/district5-mondoc-encryption/health.svg)](https://phpackages.com/packages/district5-mondoc-encryption)
```

###  Alternatives

[doctrine/mongodb-odm

PHP Doctrine MongoDB Object Document Mapper (ODM) provides transparent persistence for PHP objects to MongoDB.

1.1k23.3M302](/packages/doctrine-mongodb-odm)[mmucklo/queue-bundle

Symfony2/3/4/5 Queue Bundle (for background jobs) supporting Mongo (Doctrine ODM), Mysql (and any Doctrine ORM), RabbitMQ, Beanstalkd, Redis, and ... {write your own}

120839.8k](/packages/mmucklo-queue-bundle)[sokil/php-mongo

PHP Object Document Mapper for MongoDB

239161.5k9](/packages/sokil-php-mongo)[leroy-merlin-br/mongolid

Easy, powerful and ultrafast ODM for PHP and MongoDB.

11234.3k4](/packages/leroy-merlin-br-mongolid)[denchikby/phalcon-mongodb-odm

Phalcon MongoDB ODM

4212.8k](/packages/denchikby-phalcon-mongodb-odm)

PHPackages © 2026

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