title: sharing & storing IV for AES Encryption/decryption
body: <p>I am currently using AES-ECB encryption for user passwords on an android app, but I have to connect this app's database to a website where users can register and log in the same way as the mobile app.</p>
  
  <p>I have read that ECB mode is not secured, so I wanted to use CBC by generating an IV.</p>
  
  <p>Is it secure to store an IV as a constant in the code (I store the secret key this way too), both in php on the server side, and in the app ?</p>
  
  <p>If not, is there a way for the website and the mobile app to share it's IV to encrypt /decrypt user password ?</p>
  
  <p>Alternatively, I may have chosen the wrong encryption algorithm, there might be one that better suit my needs</p>