title: Encrypt/Decrypt with AES
body: <p>I'm writing small program to encrypt/decrypt files using AES. I'm using Cryptopp library.</p>
  
  <p>I need help to understand some things.</p>
  
  <p>When I'm encrypting file I should write IV at the beginning of file to decrypt it later?</p>
  
  <p>I wan't to check password given do decrypt file was correct. Should I:</p>
  
  <ul>
  <li><p>put some string at beginning of file (ex. TRUE) before it's encrypted. After decryption check it.</p></li>
  <li><p>Check MD5 of file before encryption. Put it at beginning of encrypted file. Read MD5 before decryption, decrypt file, check MD5 of decrypted file and compare them.</p></li>
  </ul>