title: Decrypt openssl AES 256 CBC in browser/CryptoJS
body: <p>I want to decrypt a string that has been encrypted with openssl on the server like this:</p>
  <pre><code>openssl enc -e -aes-256-cbc -pbkdf2 -a -S 0123456789ABCDEF -A -k mypassword
  </code></pre>
  <p>Note this is done providing only a salt and password, and openssl should handle key and IV automatically. Am I too optimistic that this can happen when the browser decrypts too? If at all possible, I want to do it with only those encryption settings, or the bare minimum of increased complexity. In the browser, I'm trying to decrypt with CryptoJS like this:</p>
  <pre><code>import * as CryptoJS from 'crypto-js'
  
  const encrypted = &lt;ENCRYPTED_STRING_FROM_SERVER&gt;
  const password = 'mypassword'
  const salt = '0123456789ABCDEF'
  const key = CryptoJS.PBKDF2(password, salt) // Generate key
  
  const bytes = CryptoJS.AES.decrypt(encrypted, key)
  const decrypted = bytes.toString(CryptoJS.enc.Utf8)
  console.log(decrypted)
  </code></pre>
  <p>But the call to <code>CryptoJS.AES.decrypt</code> errors with <code>Cannot read property '0' of undefined</code>, <code>crypto-js/cipher-core.js:371</code>. The docs for CryptoJS.AES.decrypt are quite thin, and any settings I am aware of to change when calling that func seem to give the same error. Thanks to anyone who can shine light!</p>