Sha256: f03da9c2e37d5ae9ff928ec6f8820fc9eba1ca338d22391d3a519d675b80a349
Contents?: true
Size: 373 Bytes
Versions: 14
Compression:
Stored size: 373 Bytes
Contents
var createHash = require('create-hash'); module.exports = function (seed, len) { var t = new Buffer(''); var i = 0, c; while (t.length < len) { c = i2ops(i++); t = Buffer.concat([t, createHash('sha1').update(seed).update(c).digest()]); } return t.slice(0, len); }; function i2ops(c) { var out = new Buffer(4); out.writeUInt32BE(c,0); return out; }
Version data entries
14 entries across 14 versions & 7 rubygems