PHPackages                             marko/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. marko/encryption

ActiveMarko-module[Security](/categories/security)

marko/encryption
================

Encryption contracts for Marko Framework

0.7.0(4w ago)0104↓36.4%2MITPHPPHP ^8.5

Since Mar 25Pushed 4w agoCompare

[ Source](https://github.com/marko-php/marko-encryption)[ Packagist](https://packagist.org/packages/marko/encryption)[ RSS](/packages/marko-encryption/feed)WikiDiscussions develop Synced 3w ago

READMEChangelogDependencies (16)Versions (18)Used By (2)

marko/encryption
================

[](#markoencryption)

Interfaces for encryption--defines how data is encrypted and decrypted, not which cipher is used.

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

[](#installation)

```
composer require marko/encryption
```

Note: You typically install a driver package (like `marko/encryption-openssl`) which requires this automatically.

Quick Example
-------------

[](#quick-example)

```
use Marko\Encryption\Contracts\EncryptorInterface;

class TokenService
{
    public function __construct(
        private EncryptorInterface $encryptor,
    ) {}

    public function issueToken(array $payload): string
    {
        return $this->encryptor->encrypt(
            json_encode($payload, JSON_THROW_ON_ERROR),
        );
    }
}
```

Documentation
-------------

[](#documentation)

Full usage, API reference, and examples: [marko/encryption](https://marko.build/docs/packages/encryption/)

###  Health Score

44

—

FairBetter than 91% of packages

Maintenance94

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity50

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

Every ~4 days

Recently: every ~15 days

Total

16

Last Release

28d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/437029?v=4)[Mark Shust](/maintainers/markshust)[@markshust](https://github.com/markshust)

---

Top Contributors

[![markshust](https://avatars.githubusercontent.com/u/437029?v=4)](https://github.com/markshust "markshust (11 commits)")

###  Code Quality

TestsPest

### Embed Badge

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

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

PHPackages © 2026

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