diff options
Diffstat (limited to 'node_modules/sha.js/sha1.js')
-rw-r--r-- | node_modules/sha.js/sha1.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/node_modules/sha.js/sha1.js b/node_modules/sha.js/sha1.js index 97f6b142d..cabd747ce 100644 --- a/node_modules/sha.js/sha1.js +++ b/node_modules/sha.js/sha1.js @@ -9,6 +9,7 @@ var inherits = require('inherits') var Hash = require('./hash') +var Buffer = require('safe-buffer').Buffer var K = [ 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0 @@ -84,7 +85,7 @@ Sha1.prototype._update = function (M) { } Sha1.prototype._hash = function () { - var H = new Buffer(20) + var H = Buffer.allocUnsafe(20) H.writeInt32BE(this._a | 0, 0) H.writeInt32BE(this._b | 0, 4) |