title: how replicate in mysql Crypto JS formula?
body: <p>I have the duty of decrypt some data in our database that was encrypted using Crypto js a year ago, I would like to know how I can replicate the formula in pure mysql scripting.</p>
  
  <p>Our actual js formula is:</p>
  
  <pre><code>// Use Cipher Mode
  var crypto = CryptoJS.lib.BlockCipherMode.extend();
  crypto.Encryptor = crypto.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}});
  crypto.Decryptor = crypto.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}});
  
  // Passphrase + iv
  var passphrase = CryptoJS.enc.Hex.parse("46536b6e32674441484c7a5374554975");
  var iv  = CryptoJS.enc.Hex.parse("2a4b04f4fa87f913b98c30bce9d7fe69");
  var value = 'st5AC+HL09fKYRJ7TxdMhQ==';
  
  var decryptedValue = CryptoJS.AES.decrypt(value, passphrase, { iv: iv, mode: crypto, padding: CryptoJS.pad.Pkcs7 }).toString(CryptoJS.enc.Utf8);
  </code></pre>
  
  <h1>UPDATE</h1>
  
  <p>I really want to understand the formula more than translate it, because what I understand is that I have to do next in mysql</p>
  
  <pre><code>SET @@session.block_encryption_mode = 'aes-128-ecb';
  select AES_DECRYPT('st5AC+HL09fKYRJ7TxdMhQ==',hex('46536b6e32674441484c7a5374554975'),hex('2a4b04f4fa87f913b98c30bce9d7fe69'))
  </code></pre>
  
  <p>The expected word is "Christos", but I just get null result.</p>