PHPackages                             frista28/stream-crypto-psr7 - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. frista28/stream-crypto-psr7

ActiveLibrary[HTTP &amp; Networking](/categories/http)

frista28/stream-crypto-psr7
===========================

PSR-7 stream decorators for WhatsApp-like media encryption

v0.1.2(3mo ago)14↓90.9%MITPHPPHP ^8.2

Since Apr 1Pushed 3mo agoCompare

[ Source](https://github.com/Frista28/stream-crypto-psr7)[ Packagist](https://packagist.org/packages/frista28/stream-crypto-psr7)[ Docs](https://github.com/frista28/stream-crypto-psr7)[ RSS](/packages/frista28-stream-crypto-psr7/feed)WikiDiscussions main Synced 4w ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

stream-crypto-psr7
==================

[](#stream-crypto-psr7)

PSR-7 stream decorators for WhatsApp-like media encryption.

The package provides:

- `Frista28\StreamCryptoPsr7\Stream\EncryptingStream` for PSR-7 stream encryption
- `Frista28\StreamCryptoPsr7\Stream\DecryptingStream` for PSR-7 stream decryption with MAC validation
- `Frista28\StreamCryptoPsr7\Crypto\MediaCrypto` for lower-level string and stream APIs
- `Frista28\StreamCryptoPsr7\Crypto\MediaType` for media-specific HKDF context selection

The crypto core processes source streams in chunks instead of loading the full payload into a single PHP string. The decorators materialize the transformed result into a seekable temporary stream on first read, so the exposed PSR-7 stream remains rewindable and seekable after transformation.

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

[](#requirements)

- PHP 8.2 or newer
- `ext-openssl`

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

[](#installation)

```
composer require frista28/stream-crypto-psr7
```

Usage
-----

[](#usage)

### Stream Decorators

[](#stream-decorators)

```
