title: Where to encrypt/decrypt my data?
body: <p>I'm using Symfony 2 with Doctrine 2.</p>
  
  <p>I need to encrypt a field in my entity using an encryption service, and I'm wondering where should I put this logic.</p>
  
  <p>I'm using a Controller > Service > Repository architecture.</p>
  
  <p>I was wondering if a listener would be a good idea, my main concern is, if my entity is stored encrypted, if I decrypt it on the fly its state it's gonna be changed and I'm not sure it's a good idea.</p>
  
  <p>How would you implement this?</p>