var HTTPResult = require('./http-result') , crypto = require('crypto'); module.exports = function(bytes) { bytes =bytes || 8; var result = new HTTPResult(); crypto.randomBytes(bytes, result.asCallback(201)); return result .then(function(buf){ return buf.toString('hex'); }); };