File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,12 @@ function processText() {
14
14
rl . on ( 'line' , ( text ) => {
15
15
const result = isBase64 ( text ) ? decodeText ( text ) : Buffer . from ( text , 'utf8' ) . toString ( 'base64' ) ;
16
16
17
- console . log ( isBase64 ( text ) ? ' Decrypted text:' : ' Encrypted text:' , ` ${ result } ` ) ;
18
- writeToOutputFile ( ` ${ result } ${ os . EOL } ` ) ;
17
+ console . log ( isBase64 ( text ) ? ` ${ os . EOL } Decrypted text:${ os . EOL } ` : ` ${ os . EOL } Encrypted text:${ os . EOL } ` , result ) ;
18
+ writeToOutputFile ( result ) ;
19
19
} ) ;
20
20
21
21
rl . on ( 'close' , ( ) => {
22
- console . log ( ' File processing complete.' ) ;
22
+ console . log ( ` ${ os . EOL } File processing complete.` ) ;
23
23
} ) ;
24
24
}
25
25
Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ function processText() {
18
18
const isEncoded = isXOREncoded ( text ) ;
19
19
const result = isEncoded ? decodeText ( text , encryptionKey ) : encodeText ( text , encryptionKey ) ;
20
20
21
- console . log ( isEncoded ? 'Decrypted text:' : 'Encrypted text:' , result ) ;
22
- writeToOutputFile ( ` ${ result } ${ os . EOL } ` ) ;
21
+ console . log ( result ) ;
22
+ writeToOutputFile ( result ) ;
23
23
} ) ;
24
24
25
25
rl . on ( 'close' , ( ) => {
You can’t perform that action at this time.
0 commit comments