simplicity-projects / crypt-bundle
加密/解密字符串的交响包
1.0
2015-11-24 13:52 UTC
Requires
- php: >=5.4
- symfony/symfony: >=2.6
This package is not auto-updated.
Last update: 2024-09-18 16:47:09 UTC
README
- 添加到AppKernel.php
new Simplicity\CryptBundle\SecurityCryptBundle();
- 更新config.yml
simplicity_crypt: secret: my_secret_value algorithm: rijndael-128 mode: ecb
- 调用服务
//Service $crypto = $this->get('simplicity_crypt.service.cryptor');
//加密一些值 $encrypted = $crypto->encrypt('Aleksandar');
//解密值 $decrypted = $crypto->decrypt($encrypted);