Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit78842cf

Browse files
tniessendebadree25
authored andcommitted
crypto: remove getDefaultEncoding()
Refs:nodejs#47182Refs:nodejs#47869Refs:nodejs#47943Refs:nodejs#47998Refs:nodejs#49140Refs:nodejs#49145Refs:nodejs#49167Refs:nodejs#49169PR-URL:nodejs#49170Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>Reviewed-By: Filip Skokan <panva.ip@gmail.com>Reviewed-By: Matteo Collina <matteo.collina@gmail.com>Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent64a5c01 commit78842cf

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

‎lib/internal/crypto/util.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,6 @@ const {
7575
constkHandle=Symbol('kHandle');
7676
constkKeyObject=Symbol('kKeyObject');
7777

78-
// TODO(tniessen): remove all call sites and this function
79-
functiongetDefaultEncoding(){
80-
return'buffer';
81-
}
82-
8378
// This is here because many functions accepted binary strings without
8479
// any explicit encoding in older versions of node, and we don't want
8580
// to break them unnecessarily.
@@ -555,7 +550,6 @@ module.exports = {
555550
getCiphers,
556551
getCurves,
557552
getDataViewOrTypedArrayBuffer,
558-
getDefaultEncoding,
559553
getHashes,
560554
kHandle,
561555
kKeyObject,

‎lib/internal/streams/lazy_transform.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ const {
1111

1212
conststream=require('stream');
1313

14-
const{
15-
getDefaultEncoding,
16-
}=require('internal/crypto/util');
17-
1814
module.exports=LazyTransform;
1915

2016
functionLazyTransform(options){
@@ -29,7 +25,7 @@ function makeGetter(name) {
2925
this._writableState.decodeStrings=false;
3026

3127
if(!this._options||!this._options.defaultEncoding){
32-
this._writableState.defaultEncoding=getDefaultEncoding();
28+
this._writableState.defaultEncoding='buffer';// TODO(tniessen): remove
3329
}
3430

3531
returnthis[name];

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp