PHPackages                             armen/whatsapp-psr7-streams - 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. armen/whatsapp-psr7-streams

ActiveLibrary

armen/whatsapp-psr7-streams
===========================

Psr-7 Decorators for WhatsApp style media decrypt-encrypt

v1.0.0(1y ago)02MITPHPPHP &gt;=8.0

Since Apr 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ArmenMarabyan/whatsapp-psr7-streams)[ Packagist](https://packagist.org/packages/armen/whatsapp-psr7-streams)[ RSS](/packages/armen-whatsapp-psr7-streams/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (2)Used By (0)

📦 WhatsApp-Compatible PSR-7 Stream Encryption/Decryption
========================================================

[](#-whatsapp-compatible-psr-7-stream-encryptiondecryption)

Это библиотека-декоратор для PSR-7 потоков, обеспечивающая шифрование и дешифрование медиафайлов по алгоритму, совместимому с WhatsApp.

🛠 Install
---------

[](#-install)

```
composer require armen/whatsapp-psr7-streams
```

Usage
-----

[](#usage)

```
use Armen\WhatsappPsr7Streams\Stream\Encrypt;
use Armen\WhatsappPsr7Streams\Stream\Decrypt;
use Armen\WhatsappPsr7Streams\MediaType;
use GuzzleHttp\Psr7\Utils;
use Nyholm\Psr7\Factory\Psr17Factory;

$mediaKey = random_bytes(32);

// $originalStream = Utils::streamFor(file_get_contents('samples/IMAGE.original'));
//or
$psr17Factory = new Psr17Factory();
$originalStream = $psr17Factory->createStream(file_get_contents('samples/IMAGE.original'));

//Шифрование
$enc = new Encrypt($input, $mediaKey, MediaType::IMAGE->value);

//Дешифрование
$dec = new Decrypt($enc, $mediaKey, MediaType::IMAGE->value);

file_put_contents('samples/results/IMAGE.enc', $enc->getContents());
file_put_contents('samples/results/IMAGE.original', $dec->getContents());
```

TODO:
-----

[](#todo)

\[ \] Покрытие тестами

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance48

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

385d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/74f6390476be3ee7a00af7d1ea845383b201fb78c23e80cd42a52a918fab5e37?d=identicon)[ArmenMarabyan](/maintainers/ArmenMarabyan)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/armen-whatsapp-psr7-streams/health.svg)

```
[![Health](https://phpackages.com/badges/armen-whatsapp-psr7-streams/health.svg)](https://phpackages.com/packages/armen-whatsapp-psr7-streams)
```

###  Alternatives

[laravel/reverb

Laravel Reverb provides a real-time WebSocket communication backend for Laravel applications.

1.5k9.4M48](/packages/laravel-reverb)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[php-opencloud/openstack

PHP SDK for OpenStack APIs. Supports BlockStorage, Compute, Identity, Images, Networking and Metric Gnocchi

2292.2M24](/packages/php-opencloud-openstack)[neos/flow-development-collection

Flow packages in a joined repository for pull requests.

144179.3k3](/packages/neos-flow-development-collection)[php-heroku-client/php-heroku-client

A PHP client for the Heroku Platform API

24404.8k4](/packages/php-heroku-client-php-heroku-client)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34170.2k2](/packages/onesignal-onesignal-php-api)

PHPackages © 2026

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