flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
19
VISUALIZACION/node_modules/public-encrypt/mgf.js
generated
vendored
Executable file
19
VISUALIZACION/node_modules/public-encrypt/mgf.js
generated
vendored
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
var createHash = require('create-hash')
|
||||
var Buffer = require('safe-buffer').Buffer
|
||||
|
||||
module.exports = function (seed, len) {
|
||||
var t = Buffer.alloc(0)
|
||||
var i = 0
|
||||
var 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 = Buffer.allocUnsafe(4)
|
||||
out.writeUInt32BE(c, 0)
|
||||
return out
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue