title: Trying to add data in unsupported state at Cipher.update
body: <p>Below code is working</p>
  
  <pre><code>var crypto = require('crypto');
  var cipher = crypto.createCipher('aes-128-cbc','abcdefghijklmnop')
  var http = require('http')
  
  var userStr = 'a134aad';
  var crypted = cipher.update(userStr, 'utf8', 'hex');
  crypted += cipher.final('hex');
  console.log(crypted);
  </code></pre>
  
  <p>But when put into a server callback it doesn't work, and throws below err when a request arriving, and node is crush:</p>
  
  <pre><code>http.createServer(function(req, res){
      var userStr = 'a134aad';
      var crypted = cipher.update(userStr, 'utf8', 'hex');
      crypted += cipher.final('hex');
      console.log(crypted);
  
      res.end('hello');
  }).listen(9888)
  
  ---------------------------------
  
  7364aee753f0568f7e5171add6868b75
  crypto.js:170
    var ret = this._handle.update(data, inputEncoding);
                           ^
  Error: Trying to add data in unsupported state
      at Cipher.update (crypto.js:170:26)
      at Server.&lt;anonymous&gt; (C:\Users\58\Desktop\sha256.js:12:26)
      at emitTwo (events.js:126:13)
      at Server.emit (events.js:214:7)
      at parserOnIncoming (_http_server.js:602:12)
      at HTTPParser.parserOnHeadersComplete (_http_common.js:117:23)
  </code></pre>