File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Open diff view settings
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Open diff view settings
Original file line number Diff line number Diff line change @@ -395,11 +395,11 @@ Example: Using `Cipher` and piped streams:
395395import {
396396 createReadStream ,
397397 createWriteStream ,
398- } from ' fs' ;
398+ } from ' node: fs' ;
399399
400400import {
401401 pipeline
402- } from ' stream' ;
402+ } from ' node: stream' ;
403403
404404const {
405405 scrypt ,
@@ -675,6 +675,7 @@ const decipher = createDecipheriv(algorithm, key, iv);
675675
676676let decrypted = ' ' ;
677677decipher .on (' readable' , () => {
678+ let chunk;
678679 while (null !== (chunk = decipher .read ())) {
679680 decrypted += chunk .toString (' utf8' );
680681 }
@@ -711,6 +712,7 @@ const decipher = createDecipheriv(algorithm, key, iv);
711712
712713let decrypted = ' ' ;
713714decipher .on (' readable' , () => {
715+ let chunk;
714716 while (null !== (chunk = decipher .read ())) {
715717 decrypted += chunk .toString (' utf8' );
716718 }
@@ -733,7 +735,7 @@ Example: Using `Decipher` and piped streams:
733735import {
734736 createReadStream ,
735737 createWriteStream ,
736- } from ' fs' ;
738+ } from ' node: fs' ;
737739import { Buffer } from ' node:buffer' ;
738740const {
739741 scryptSync ,
@@ -3305,7 +3307,7 @@ Example: generating the sha256 sum of a file
33053307``` mjs
33063308import {
33073309 createReadStream
3308- } from ' fs' ;
3310+ } from ' node: fs' ;
33093311import { argv } from ' node:process' ;
33103312const {
33113313 createHash
@@ -3391,7 +3393,7 @@ Example: generating the sha256 HMAC of a file
33913393``` mjs
33923394import {
33933395 createReadStream
3394- } from ' fs' ;
3396+ } from ' node: fs' ;
33953397import { argv } from ' node:process' ;
33963398const {
33973399 createHmac
You can’t perform that action at this time.
0 commit comments