anton-panfilov/cryptographer 问题修复 & 功能扩展

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

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

anton-panfilov/cryptographer

最新稳定版本:1.0.0

Composer 安装命令:

composer require anton-panfilov/cryptographer

包简介

README 文档

README

Generate the passphrase once and save it securely in your configuration

IMPORTANT: Ensure this passphrase is stored in a secure location (e.g., environment variables, secrets manager)

PHP:

$algo       = "aes-256-cfb";
$key_length = openssl_cipher_key_length();
$passphrase = openssl_random_pseudo_bytes($key_length);

// if you're planing to save this to the environment, better to make base64
$passphrase_base64 = base64_encode($passphrase);

Bash:

echo $(openssl rand -base64 32)

Use cases:

Algorithm Integrity Check Overhead Usage Example
AES-256-GCM ✅ Yes 16-28 bytes, IV 12 bytes + Tag 4-12 bytes Encrypting sensitive messages where data integrity is critical, e.g., API tokens.
Storing sensitive configuration data with integrity protection.
Optional authenticated additional data (AAD), not included in ciphertext but verified.
AES-256-CFB ❌ No 16 bytes, IV only Streaming data encryption where low latency is required, e.g., video streaming.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固