diff --git a/lib/internal/crypto/util.js b/lib/internal/crypto/util.js index cf044e804ad05a..51ca3f4c056fb9 100644 --- a/lib/internal/crypto/util.js +++ b/lib/internal/crypto/util.js @@ -75,11 +75,6 @@ const { const kHandle = Symbol('kHandle'); const kKeyObject = Symbol('kKeyObject'); -// TODO(tniessen): remove all call sites and this function -function getDefaultEncoding() { - return 'buffer'; -} - // This is here because many functions accepted binary strings without // any explicit encoding in older versions of node, and we don't want // to break them unnecessarily. @@ -555,7 +550,6 @@ module.exports = { getCiphers, getCurves, getDataViewOrTypedArrayBuffer, - getDefaultEncoding, getHashes, kHandle, kKeyObject, diff --git a/lib/internal/streams/lazy_transform.js b/lib/internal/streams/lazy_transform.js index d9d1407a819594..204ad456cd64b3 100644 --- a/lib/internal/streams/lazy_transform.js +++ b/lib/internal/streams/lazy_transform.js @@ -11,10 +11,6 @@ const { const stream = require('stream'); -const { - getDefaultEncoding, -} = require('internal/crypto/util'); - module.exports = LazyTransform; function LazyTransform(options) { @@ -29,7 +25,7 @@ function makeGetter(name) { this._writableState.decodeStrings = false; if (!this._options || !this._options.defaultEncoding) { - this._writableState.defaultEncoding = getDefaultEncoding(); + this._writableState.defaultEncoding = 'buffer'; // TODO(tniessen): remove } return this[name];