尝试crypto.randomBytes():
require('crypto').randomBytes(48, function(err, buffer) { var token = buffer.toString('hex');});“十六进制”编码在节点v0.6.x或更高版本中有效。

尝试crypto.randomBytes():
require('crypto').randomBytes(48, function(err, buffer) { var token = buffer.toString('hex');});“十六进制”编码在节点v0.6.x或更高版本中有效。