Skip to content
This repository was archived by the owner on May 9, 2026. It is now read-only.

feat: 引入 Argon2id 密钥派生

Choose a tag to compare

@watanabe-hsad watanabe-hsad released this 10 Aug 14:07
· 15 commits to main since this release

feat(security): 使用 Argon2id 派生加密密钥

  • 主加密密钥 (AES-256) 现在由一个 Salt 通过 Argon2id 在运行时派生,密钥本身不再硬编码进最终文件。
  • 新增 internal/keymgr 包统一管理密钥派生逻辑。
  • 更新加载器模板 (loaderTemplate) 以在运行时执行密钥派生和解密。

refactor(cli): 支持通过环境变量 GOPHANTOM_SALT 注入 Salt

  • 若 GOPHANTOM_SALT (Base64) 环境变量未设置,则自动生成随机 Salt 以保证可用性。

build(deps): 添加 golang.org/x/crypto 依赖

  • 为支持 Argon2id 算法,已将新依赖项更新至 go.mod。