diff --git a/lib/internal/crypto/cipher.js b/lib/internal/crypto/cipher.js index 69be334b7e9748..a2b560d1382418 100644 --- a/lib/internal/crypto/cipher.js +++ b/lib/internal/crypto/cipher.js @@ -45,7 +45,6 @@ const { } = require('internal/crypto/keys'); const { - getDefaultEncoding, getArrayBufferOrView, getStringOption, kHandle, @@ -172,10 +171,6 @@ Cipher.prototype._flush = function _flush(callback) { }; Cipher.prototype.update = function update(data, inputEncoding, outputEncoding) { - const encoding = getDefaultEncoding(); - inputEncoding = inputEncoding || encoding; - outputEncoding = outputEncoding || encoding; - if (typeof data === 'string') { validateEncoding(data, inputEncoding); } else if (!isArrayBufferView(data)) { @@ -195,7 +190,6 @@ Cipher.prototype.update = function update(data, inputEncoding, outputEncoding) { Cipher.prototype.final = function final(outputEncoding) { - outputEncoding = outputEncoding || getDefaultEncoding(); const ret = this[kHandle].final(); if (outputEncoding && outputEncoding !== 'buffer') {