simplicity-projects / crypt-bundle
A symphony bundle for crypt/decrypt strings
Installs: 17
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.4
- symfony/symfony: >=2.6
This package is not auto-updated.
Last update: 2024-12-11 17:54:19 UTC
README
Code copied from http://www.inanzzz.com/index.php/post/rxqs/creating-an-encrypt-decrypt-symfony-bundle-that-depends-on-config-parameters-of-main-application
- Add to AppKernel.php
new Simplicity\CryptBundle\SecurityCryptBundle();
- Update config.yml
simplicity_crypt: secret: my_secret_value algorithm: rijndael-128 mode: ecb
- Call service
//Service $crypto = $this->get('simplicity_crypt.service.cryptor');
//Encrypt some value $encrypted = $crypto->encrypt('Aleksandar');
//Decrypt the value $decrypted = $crypto->decrypt($encrypted);