PHPackages                             philetaylor/php-gpglib - 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. philetaylor/php-gpglib

ActiveLibrary[Security](/categories/security)

philetaylor/php-gpglib
======================

A wrapper around GPG for stateless operations. PSR/Log 1.0+

0.2.4(8y ago)110.0kMITPHPCI failing

Since Sep 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/PhilETaylor/php-gpglib)[ Packagist](https://packagist.org/packages/philetaylor/php-gpglib)[ RSS](/packages/philetaylor-php-gpglib/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (6)Versions (7)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/92b5e9c710683f2b915c0bd75953b26435fa3e38e90bf67f612c8f506907da12/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77696b696d656469612f6770676c69622e7376673f7374796c653d666c6174)](https://packagist.org/packages/wikimedia/gpglib) [![License](https://camo.githubusercontent.com/89dec929b1161db4a40dbaca4529e27aa0522b0610aea868cd6c0b897ad32060/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f77696b696d656469612f6770676c69622e7376673f7374796c653d666c6174)](https://github.com/wikimedia/php-gpglib/blob/master/LICENSE)[![Build Status](https://camo.githubusercontent.com/051d20f60f2d8ab55436104754e2b810e58418072f3dd41de2db8e51cb34aa29/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f77696b696d656469612f7068702d6770676c69622e7376673f7374796c653d666c6174)](https://travis-ci.org/wikimedia/php-gpglib)

php-gpglib
==========

[](#php-gpglib)

A wrapper around GPG for stateless operations. Text and keys are passed as strings and the output is returned likewise. In the background, GpgLib creates a temporary home directory for GPG and deletes it when it is finished.

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

[](#installation)

```
$ composer require wikimedia/gpglib

```

Usage
-----

[](#usage)

```
$factory = new \GpgLib\ShellGpgLibFactory();
$gpgLib = $factory->create();
$ciphertext = $gpgLib->encrypt( $cleartext, $key );

```

Running tests
-------------

[](#running-tests)

```
$ composer install
$ composer test

```

Contributing
------------

[](#contributing)

Bug, feature requests and other issues should be reported to the [GitHub project](https://github.com/wikimedia/php-gpglib). We accept code and documentation contributions via Pull Requests on GitHub as well.

- [MediaWiki coding conventions](https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP) are used by the project. The included test configuration uses [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer) to validate the conventions.
- Tests are encouraged. Our test coverage isn't perfect but we'd like it to get better rather than worse, so please try to include tests with your changes.
- Keep the documentation up to date. Make sure `README.md` and other relevant documentation is kept up to date with your changes.
- One pull request per feature. Try to keep your changes focused on solving a single problem. This will make it easier for us to review the change and easier for you to make sure you have updated the necessary tests and documentation.

License
-------

[](#license)

php-gpglib is licensed under the MIT license. See the `LICENSE` file for more details.

---

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~209 days

Total

5

Last Release

3096d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/492cad83f394abf358f646f36e3bff9c21aff9627ef78a88f64412b5346ff196?d=identicon)[PhilETaylor](/maintainers/PhilETaylor)

---

Top Contributors

[![tgr](https://avatars.githubusercontent.com/u/145412?v=4)](https://github.com/tgr "tgr (11 commits)")[![PhilETaylor](https://avatars.githubusercontent.com/u/400092?v=4)](https://github.com/PhilETaylor "PhilETaylor (7 commits)")[![bd808](https://avatars.githubusercontent.com/u/6469?v=4)](https://github.com/bd808 "bd808 (4 commits)")

---

Tags

encryptiongpg

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/philetaylor-php-gpglib/health.svg)

```
[![Health](https://phpackages.com/badges/philetaylor-php-gpglib/health.svg)](https://phpackages.com/packages/philetaylor-php-gpglib)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[pear/crypt_gpg

Provides an object oriented interface to the GNU Privacy Guard (GnuPG). It requires the GnuPG executable to be on the system.

974.6M12](/packages/pear-crypt-gpg)[kelunik/acme

ACME library written in PHP.

121610.5k3](/packages/kelunik-acme)[api-platform/metadata

API Resource-oriented metadata attributes and factories

275.0M218](/packages/api-platform-metadata)[acmephp/core

Raw implementation of the ACME protocol in PHP

411.0M8](/packages/acmephp-core)

PHPackages © 2026

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