PHPackages                             zbateson/mmp-crypt - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. zbateson/mmp-crypt

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

zbateson/mmp-crypt
==================

Cryptographic support for zbateson/mail-mime-parser (encryption, decryption, signing, verification)

1.0.0(4mo ago)11.4k[1 PRs](https://github.com/zbateson/mmp-crypt/pulls)2BSD-2-ClausePHPPHP &gt;=8.1

Since Mar 25Pushed 4mo agoCompare

[ Source](https://github.com/zbateson/mmp-crypt)[ Packagist](https://packagist.org/packages/zbateson/mmp-crypt)[ RSS](/packages/zbateson-mmp-crypt/feed)WikiDiscussions master Synced today

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

zbateson/mmp-crypt
==================

[](#zbatesonmmp-crypt)

Cryptographic support for [zbateson/mail-mime-parser](https://github.com/zbateson/mail-mime-parser) -- provides base classes and interfaces for encryption, decryption, signing, and verification of MIME email messages.

[![Total Downloads](https://camo.githubusercontent.com/3dbc4f940b960859ef14bcd588134d0101087ab17c3e77fef874170f0d321b08/68747470733a2f2f706f7365722e707567782e6f72672f7a62617465736f6e2f6d6d702d63727970742f646f776e6c6f616473)](//packagist.org/packages/zbateson/mmp-crypt)[![Latest Stable Version](https://camo.githubusercontent.com/dda8da64da4587e973b09e6b7b137758766025fa1bdadc48bdd9f4a53115b6aa/68747470733a2f2f706f7365722e707567782e6f72672f7a62617465736f6e2f6d6d702d63727970742f76)](//packagist.org/packages/zbateson/mmp-crypt)

```
composer require zbateson/mmp-crypt

```

Sponsors
--------

[](#sponsors)

[![SecuMailer](https://camo.githubusercontent.com/74de27677ddf07fa571fcca6558d34be0fa6486bf473de73261461b89b12e8c5/68747470733a2f2f6d61696c2d6d696d652d7061727365722e6f72672f73706f6e736f72732f6c6f676f2d736563756d61696c65722e706e67)](https://secumailer.com)

A huge thank you to [all my sponsors](https://github.com/sponsors/zbateson). &lt;3

If this project's helped you, please consider [sponsoring me](https://github.com/sponsors/zbateson).

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

[](#requirements)

PHP 8.1 or newer, and [zbateson/mail-mime-parser](https://github.com/zbateson/mail-mime-parser) 4.x.

Description
-----------

[](#description)

This is the base package for mail-mime-parser's cryptographic plugin system. It provides:

- `IMimeCrypt` -- interface for encryption/decryption/signing/verification implementations
- `AbstractMimeCrypt` -- base class implementing `IMimeCrypt` with stream handling
- `EncryptedMessage` / `EncryptedMimePart` -- message/part classes that transparently expose decrypted content via `getStream()`, with `getEncryptedStream()` for accessing the original encrypted data

On its own, this package doesn't perform any cryptographic operations. Install an implementation package:

- [zbateson/mmp-crypt-smime](https://github.com/zbateson/mmp-crypt-smime) -- S/MIME via PHP's OpenSSL extension
- [zbateson/mmp-crypt-gpg](https://github.com/zbateson/mmp-crypt-gpg) -- PGP/MIME via the PECL gnupg extension

Usage
-----

[](#usage)

```
use ZBateson\MailMimeParser\Message;

// Parsing an encrypted message automatically uses the registered
// IMimeCrypt implementation to decrypt it.
$message = Message::from($rawEmail, false);

// If the message was encrypted, it will be an EncryptedMessage instance.
// getStream() / getTextContent() / etc. return decrypted content by default.
echo $message->getTextContent();

// Access the original encrypted stream if needed
if ($message instanceof \ZBateson\MmpCrypt\EncryptedMessage) {
    $encryptedStream = $message->getEncryptedStream();
}
```

License
-------

[](#license)

BSD licensed - please see [license agreement](https://github.com/zbateson/mmp-crypt/blob/master/LICENSE).

###  Health Score

48

—

FairBetter than 93% of packages

Maintenance74

Regular maintenance activity

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity71

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

Total

2

Last Release

139d ago

Major Versions

0.1 → 1.0.02026-02-13

PHP version history (2 changes)0.1PHP &gt;=5.4

1.0.0PHP &gt;=8.1

### Community

Maintainers

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

---

Top Contributors

[![zbateson](https://avatars.githubusercontent.com/u/8356974?v=4)](https://github.com/zbateson "zbateson (6 commits)")

---

Tags

cryptographyencryptionmimeemailPGPsmimemail-mime-parser

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zbateson-mmp-crypt/health.svg)

```
[![Health](https://phpackages.com/badges/zbateson-mmp-crypt/health.svg)](https://phpackages.com/packages/zbateson-mmp-crypt)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69735.1M159](/packages/algolia-algoliasearch-client-php)[zbateson/mail-mime-parser

MIME email message parser

54753.3M91](/packages/zbateson-mail-mime-parser)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M736](/packages/sylius-sylius)[gotenberg/gotenberg-php

A PHP client for interacting with Gotenberg, a developer-friendly API for converting numerous document formats into PDF files, and more!

3856.2M31](/packages/gotenberg-gotenberg-php)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)

PHPackages © 2026

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