问题 Below code is working 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); But when put into a server callback it doesn't work, and throws below err when a request arriving, and node is crush: http.createServer(function(req, res){ var userStr = 'a134aad'; var crypted = cipher.update(userStr,