定制 mathbdw/whatsapp-stream-encryption-test 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mathbdw/whatsapp-stream-encryption-test

最新稳定版本:v2.0.1

Composer 安装命令:

composer require mathbdw/whatsapp-stream-encryption-test

包简介

Test task PSR-7 Stream decorators for WhatsApp encryption algorithms

README 文档

README

composer require mathbdw/whatsapp-stream-encryption-test

Usage

Encrypt stream

$pathIn = './static/IMAGE.original'; $pathOut = './static/IMAGE.encrypted'; $key = './samples/IMAGE.key';

$encryption = new \WhatsApp\StreamEncryption\Models\EncryptWhatsAppStreamImage($pathIn, $pathOut); $encryption->exec($key);

The key is not required. If there is no key after encryption, the key file will be added to the output file folder.

$pathIn = './static/IMAGE.original';
$pathOut = './static/IMAGE.encrypted';

$encryption = new \WhatsApp\StreamEncryption\Models\EncryptWhatsAppStreamImage($pathIn, $pathOut);
$encryption->exec();

Decrypt stream

$pathIn = './static/IMAGE.encrypted';
$pathOut = './static/IMAGE.original';
$key = './samples/IMAGE.key';

$decryption = new \WhatsApp\StreamEncryption\Models\DecryptWhatsAppStreamImage($pathIn, $pathOut); $decryption->exec($key);

Type file encryption

  //Video
  $enStream = new \WhatsApp\StreamEncryption\Models\EncryptWhatsAppStreamImage($pathIn, $pathOut);
  $deStream = new \WhatsApp\StreamEncryption\Models\DecryptWhatsAppStreamImage($pathIn, $pathOut);
  //Audio
  $enStream = new \WhatsApp\StreamEncryption\Models\EncryptWhatsAppStreamAudio($pathIn, $pathOut);
  $deStream = new \WhatsApp\StreamEncryption\Models\DecryptWhatsAppStreamAudio($pathIn, $pathOut);
  //Image
  $enStream = new \WhatsApp\StreamEncryption\Models\EncryptWhatsAppStreamImage($pathIn, $pathOut);
  $deStream = new \WhatsApp\StreamEncryption\Models\DecryptWhatsAppStreamImage($pathIn, $pathOut);
  //Document
  $enStream = new \WhatsApp\StreamEncryption\Models\EncryptWhatsAppStreamDocument($pathIn, $pathOut);
  $deStream = new \WhatsApp\StreamEncryption\Models\DecryptWhatsAppStreamDocument($pathIn, $pathOut);

统计信息

  • 总下载量: 12
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-09