summaryrefslogtreecommitdiff
path: root/lib/internal/crypto/cipher.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/internal/crypto/cipher.js')
-rw-r--r--lib/internal/crypto/cipher.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/internal/crypto/cipher.js b/lib/internal/crypto/cipher.js
index cdb92465ec..7f88320d6c 100644
--- a/lib/internal/crypto/cipher.js
+++ b/lib/internal/crypto/cipher.js
@@ -32,7 +32,6 @@ const {
const assert = require('assert');
const LazyTransform = require('internal/streams/lazy_transform');
-const { inherits } = require('util');
const { deprecate, normalizeEncoding } = require('internal/util');
// Lazy loaded for startup performance.
@@ -124,7 +123,7 @@ function Cipher(cipher, password, options) {
createCipher.call(this, cipher, password, options, true);
}
-inherits(Cipher, LazyTransform);
+Object.setPrototypeOf(Cipher.prototype, LazyTransform.prototype);
Cipher.prototype._transform = function _transform(chunk, encoding, callback) {
this.push(this[kHandle].update(chunk, encoding));
@@ -254,7 +253,7 @@ function addCipherPrototypeFunctions(constructor) {
constructor.prototype.setAAD = Cipher.prototype.setAAD;
}
-inherits(Cipheriv, LazyTransform);
+Object.setPrototypeOf(Cipheriv.prototype, LazyTransform.prototype);
addCipherPrototypeFunctions(Cipheriv);
legacyNativeHandle(Cipheriv);
@@ -265,7 +264,7 @@ function Decipher(cipher, password, options) {
createCipher.call(this, cipher, password, options, false);
}
-inherits(Decipher, LazyTransform);
+Object.setPrototypeOf(Decipher.prototype, LazyTransform.prototype);
addCipherPrototypeFunctions(Decipher);
legacyNativeHandle(Decipher);
@@ -277,7 +276,7 @@ function Decipheriv(cipher, key, iv, options) {
createCipherWithIV.call(this, cipher, key, options, false, iv);
}
-inherits(Decipheriv, LazyTransform);
+Object.setPrototypeOf(Decipheriv.prototype, LazyTransform.prototype);
addCipherPrototypeFunctions(Decipheriv);
legacyNativeHandle(Decipheriv);