rdaudov/whatsapp-encryptor

PSR-7 stream decorators for WhatsApp media encryption

Maintainers

Package info

github.com/RDaudov/whatsapp-stream-encryption

pkg:composer/rdaudov/whatsapp-encryptor

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-02-17 00:29 UTC

This package is auto-updated.

Last update: 2026-03-17 00:38:47 UTC


README

A PHP library for encrypting and decrypting WhatsApp media files (images, videos, audio, documents) according to WhatsApp's media encryption specification.

About

This project implements WhatsApp's media encryption algorithm including:

  • AES-256-CBC encryption/decryption
  • HKDF key derivation
  • Sidecar generation for streamable media (VIDEO, AUDIO)
  • Full test coverage

Installation

Requirements

  • PHP 8.1 or higher
  • Composer
  • OpenSSL extension

Setup

  1. Clone the repository:
git clone https://github.com/RDaudov/whatsapp-stream-encryption.git
cd whatsapp-stream-encryption

Install dependencies: composer install

Expected output:

.................................. 34 / 34 (100%)

Time: 00:00.105, Memory: 16.00 MB

OK (34 tests, 57 assertions)

Test Instructions

To verify the project works correctly:

Install dependencies: composer install

Run tests: composer test

Confirm all 34 tests pass successfully