d3nengineer/stream-encryption-psr7 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

d3nengineer/stream-encryption-psr7

最新稳定版本:v1.0.1

Composer 安装命令:

composer require d3nengineer/stream-encryption-psr7

包简介

PSR-7 stream decorators for media encryption (AES-CBC + HKDF + HMAC)

README 文档

README

d3nengineer/stream-encryption-psr7 is a PHP 8.2+ library that exposes lazy PSR-7 stream decorators for media encryption and decryption using AES-CBC, HKDF-SHA256, and truncated HMAC-SHA256 payloads.

Warning

Do not use in production. This repository was created as part of a test assignment and is published for demonstration purposes only. It is not production-ready and is not recommended for real-world use.

Installation

composer require d3nengineer/stream-encryption-psr7

Recommended Entry Point

Use Infra\StreamEncryption\Stream\StreamFactory for the common happy path. It creates lazy encrypting and decrypting decorators without changing the underlying stream behavior or exception model.

<?php

use GuzzleHttp\Psr7\Utils;
use Infra\StreamEncryption\Enum\MediaType;
use Infra\StreamEncryption\Stream\StreamFactory;

$factory = new StreamFactory();
$mediaKey = random_bytes(32);

$encrypted = $factory->encrypt(
    Utils::streamFor("binary\x00payload"),
    $mediaKey,
    MediaType::IMAGE,
);

$decrypted = $factory->decrypt(
    Utils::streamFor((string) $encrypted),
    $mediaKey,
    MediaType::IMAGE,
);

$plaintext = (string) $decrypted;

Supported Runtime

  • PHP 8.2+
  • psr/http-message ^1.0 or ^2.0
  • guzzlehttp/psr7 ^2.0

Verification

Run the same checks locally that the repository uses for release-readiness:

composer check

More Details

Package behavior and operational guarantees that do not belong on the landing page live in docs/usage.md. Maintainer-facing release steps live in docs/release-checklist.md.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固