Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions lib/internal/crypto/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -555,7 +550,6 @@ module.exports = {
getCiphers,
getCurves,
getDataViewOrTypedArrayBuffer,
getDefaultEncoding,
getHashes,
kHandle,
kKeyObject,
Expand Down
6 changes: 1 addition & 5 deletions lib/internal/streams/lazy_transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ const {

const stream = require('stream');

const {
getDefaultEncoding,
} = require('internal/crypto/util');

module.exports = LazyTransform;

function LazyTransform(options) {
Expand All @@ -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];
Expand Down