title: Decryption returns empty string
body: <p>I am trying to encrypt a message from android then decrypt it in web.</p>
  
  <p>Firstly, I generate a key using Javascript and store it in my database</p>
  
  <pre><code>var text = "";
  var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  
  for( var i=0; i &lt;10; i++ )
      text += possible.charAt(Math.floor(Math.random() * possible.length));
  secondaryDatabase.ref().update({
      [displayName]:text
  })
  </code></pre>
  
  <p>Secondly, I encrypt the message in Java by retrieving the message in the input field and the key from the database.</p>
  
  <pre><code>message.setText(message);
  String key = String.valueOf(dataSnapshot);
  encryptedI = AESCrypt.encrypt(key,message);
  </code></pre>
  
  <p>For simplicity purpose, lets just take it that message is "hello world " and the key is password</p>
  
  <pre><code>String message = "hello world";
  String key = "password";
  encryptedI = AESCrypt.encrypt(key,message);
  </code></pre>
  
  <p>Thirdly, i stored the encrypted message in the database.</p>
  
  <pre><code>mRef.child(uid).child("encryptedmessage").setValue(encryptedI);
  </code></pre>
  
  <p>Lastly, I decrypted the message using the key both retrieved from database with Cryto-js on javascript but it returns a empty string</p>
  
  <pre><code>var decrypted = CryptoJS.AES.decrypt(message,key);
  var decryptedvalue=decrypted.toString(CryptoJS.enc.Utf8)
  </code></pre>
  
  <p>I have checked that the key and encrypted message used is the  same, I even decrypted in Java to make sure that the encryption is done correctly. 
  I used <a href="https://github.com/scottyab/AESCrypt-Android" rel="nofollow noreferrer">https://github.com/scottyab/AESCrypt-Android</a> for encryption in Android
  while cryto-js for decryption in javascript</p>
  
  <p>The question is why does it returns a empty string and how can i solve it.</p>