title: How to decryption data in browser side which is encrypted on nodejs crypto lib?
body: <pre><code>var express = require('express');
  var router = express.Router();
  var crypto = require('crypto');
  
  /* GET home page. */
  router.get('/', function(req, res) {
      res.render('index', { title: 'Express' });
  });
  
  router.get('/data', function(req, res) {
      var cipher = crypto.createCipher('aes256', 'pass');
      var data = 'myMessage';
      cipher.update(data, 'utf8','hex');
      var cip = cipher.final('hex');
      console.log("Encrypted data = " + cip); // output : Encrypted data = ac56181551e250293a60b19377583462
      res.send(cip);
  });
  
  module.exports = router;
  </code></pre>
  
  <p>Above is my node js code... </p>
  
  <p>Please guide me how to decrypt the return data in browser. I hate tryed the following but it was give some wrong output.</p>
  
  <pre><code>&lt;script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/aes.js"&gt;&lt;/script&gt;
  
  ...
  
  http.get('/data').success(function(en){
      console.log('data = ' + en);
      var decrypted = CryptoJS.AES.decrypt(en, "pass");
      data = decrypted;  // output : {"words":[1554796213,1611862464,1270695700,366896005,1827398142,-336097742,936488021,959734499],"sigBytes":-26}
  });
  </code></pre>