diff options
Diffstat (limited to 'lib/internal/crypto/hash.js')
-rw-r--r-- | lib/internal/crypto/hash.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/internal/crypto/hash.js b/lib/internal/crypto/hash.js index 6803d8fa95..460e47138e 100644 --- a/lib/internal/crypto/hash.js +++ b/lib/internal/crypto/hash.js @@ -21,7 +21,6 @@ const { ERR_INVALID_ARG_TYPE } = require('internal/errors').codes; const { validateString } = require('internal/validators'); -const { inherits } = require('util'); const { normalizeEncoding } = require('internal/util'); const { isArrayBufferView } = require('internal/util/types'); const LazyTransform = require('internal/streams/lazy_transform'); @@ -39,7 +38,7 @@ function Hash(algorithm, options) { LazyTransform.call(this, options); } -inherits(Hash, LazyTransform); +Object.setPrototypeOf(Hash.prototype, LazyTransform.prototype); Hash.prototype._transform = function _transform(chunk, encoding, callback) { this[kHandle].update(chunk, encoding); @@ -100,7 +99,7 @@ function Hmac(hmac, key, options) { LazyTransform.call(this, options); } -inherits(Hmac, LazyTransform); +Object.setPrototypeOf(Hmac.prototype, LazyTransform.prototype); Hmac.prototype.update = Hash.prototype.update; |