PHPackages                             zbateson/gpg-interface - 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. zbateson/gpg-interface

Abandoned → [zbateson/crypt-interface](/?search=zbateson%2Fcrypt-interface)Library[Security](/categories/security)

zbateson/gpg-interface
======================

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

0.1(7y ago)1183[1 PRs](https://github.com/zbateson/crypt-interface/pulls)BSD-2-ClausePHPPHP &gt;=5.4

Since Mar 25Pushed 3mo agoCompare

[ Source](https://github.com/zbateson/crypt-interface)[ Packagist](https://packagist.org/packages/zbateson/gpg-interface)[ RSS](/packages/zbateson-gpg-interface/feed)WikiDiscussions master Synced 3d ago

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

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

32

—

LowBetter than 72% of packages

Maintenance55

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

2608d ago

### 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

encryptioninterfacePGPgpg

### Embed Badge

![Health badge](/badges/zbateson-gpg-interface/health.svg)

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

###  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)[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)[kelunik/acme

ACME library written in PHP.

121603.9k3](/packages/kelunik-acme)[acmephp/core

Raw implementation of the ACME protocol in PHP

38973.7k7](/packages/acmephp-core)

PHPackages © 2026

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