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

1.0 2015-11-24 13:52 UTC

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

  1. Add to AppKernel.php

new Simplicity\CryptBundle\SecurityCryptBundle();

  1. Update config.yml

simplicity_crypt: secret: my_secret_value algorithm: rijndael-128 mode: ecb

  1. Call service

//Service $crypto = $this->get('simplicity_crypt.service.cryptor');

//Encrypt some value $encrypted = $crypto->encrypt('Aleksandar');

//Decrypt the value $decrypted = $crypto->decrypt($encrypted);