定制 ap-lib/cryptographer 二次开发

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

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

ap-lib/cryptographer

最新稳定版本:1.0.0

Composer 安装命令:

composer require ap-lib/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.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-12