UNPKG

node-uglifier-es

Version:

Fully auto merging and uglifying a whole NodeJs project into one file with external files option. Recompiled from Zsolt Istvan Szabo's work with uglify-es instead of uglify-js-harmony.

35 lines (25 loc) 910 B
// Generated by CoffeeScript 1.7.1 (function() { var crypto, cryptoUtils, sugar, _; _ = require('underscore'); sugar = require('sugar'); crypto = require("crypto"); cryptoUtils = module.exports; cryptoUtils.generateSalt = function(saltLength) { return crypto.randomBytes(Math.ceil(saltLength / 2)).toString('hex').substring(0, saltLength); }; cryptoUtils.getSaltedHash = function(message, hashAlgorithm, salt) { return crypto.createHmac(hashAlgorithm, salt).update(message).digest('hex'); }; cryptoUtils.shuffleArray = function(array) { var i, j, temp, _i, _ref; for (i = _i = _ref = array.length - 1; _ref <= 0 ? _i <= 0 : _i >= 0; i = _ref <= 0 ? ++_i : --_i) { j = Math.floor(Math.random() * (i + 1)); temp = array[i]; array[i] = array[j]; array[j] = temp; } return array; }; }).call(this); //# sourceMappingURL=cryptoutils.map