talentrydev / cryptography-bundle
Symfony 扩展,集成 talentrydev/cryptography 库
3.0.0
2024-06-14 14:25 UTC
Requires
- php: ^8.3
- symfony/framework-bundle: ^6.3
- symfony/yaml: ^6.3
- talentrydev/cryptography: ^2.0.0
Requires (Dev)
- phpunit/phpunit: ^11
- squizlabs/php_codesniffer: ^3.7
README
这是一个用于将 talentrydev/cryptography 库集成到 Symfony 项目的 Symfony 扩展。
安装
- 运行
composer require talentrydev/cryptography-bundle
- 将 CryptographyBundle 添加到内核的
registerBundles
方法中
return [
//...
new \Talentry\CryptographyBundle\CryptographyBundle();
];
配置
该扩展公开以下配置
选项 | 默认值 | 必需 | 描述 |
---|---|---|---|
encryption_key | - | 是 | 用于加密字符串的密钥。必须使用 EncryptionServiceFactory::generateEncryptionKey() 方法生成。 |
hash_key | - | 是 | 生成哈希的密钥。可以是长度在 16 到 64 个字符之间的任何字符串。 |
开发
- 安装依赖项:
make deps
- 运行测试:
make test