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. [Utility &amp; Helpers](/categories/utility)
4. /
5. armen/whatsapp-psr7-streams

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

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 today

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

25

—

LowBetter than 35% of packages

Maintenance44

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

437d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/34896363?v=4)[ArmenMarabyan](/maintainers/ArmenMarabyan)[@ArmenMarabyan](https://github.com/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

[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)[guzzlehttp/guzzle

Guzzle is a PHP HTTP client library

23.5k1.0B35.4k](/packages/guzzlehttp-guzzle)[google/cloud-core

Google Cloud PHP shared dependency, providing functionality useful to all components.

346132.9M112](/packages/google-cloud-core)[toin0u/geocoder-laravel

Geocoder Service Provider for Laravel

7615.4M17](/packages/toin0u-geocoder-laravel)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[drupal/core

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

21866.0M1.7k](/packages/drupal-core)

PHPackages © 2026

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