From fe3f92e8178e8d7dea1bc502e15af6bcaf39bcc6 Mon Sep 17 00:00:00 2001 From: "A. Rex Sutton" Date: Sat, 20 Jun 2015 18:42:29 -0600 Subject: [PATCH] Webpack compatibility --- src/schemes/oaep.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/schemes/oaep.js b/src/schemes/oaep.js index 87bb8ea..2d3db6c 100644 --- a/src/schemes/oaep.js +++ b/src/schemes/oaep.js @@ -48,10 +48,10 @@ module.exports.eme_oaep_mgf1 = function (seed, maskLength, hashFunction) { var c = new Buffer(4); for (var i = 0; i < count; ++i) { var hash = crypt.createHash(hashFunction); - hash.write(seed); + hash.update(seed); c.writeUInt32BE(i, 0); - hash.end(c); - hash.read().copy(T, i * hLen); + hash.update(c); + hash.digest().copy(T, i * hLen); } return T.slice(0, maskLength); }; @@ -177,4 +177,4 @@ module.exports.makeScheme = function (key, options) { }; return new Scheme(key, options); -}; \ No newline at end of file +};