GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — crypto: remove default encoding from cipher · nodejs/node@ac8dd61

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/crypto
    • cipher.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/crypto/cipher.js‎

Copy file name to clipboardExpand all lines: lib/internal/crypto/cipher.js
-6Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ const {
4545
} = require('internal/crypto/keys');
4646

4747
const {
48-
getDefaultEncoding,
4948
getArrayBufferOrView,
5049
getStringOption,
5150
kHandle,
@@ -172,10 +171,6 @@ Cipher.prototype._flush = function _flush(callback) {
172171
};
173172

174173
Cipher.prototype.update = function update(data, inputEncoding, outputEncoding) {
175-
const encoding = getDefaultEncoding();
176-
inputEncoding = inputEncoding || encoding;
177-
outputEncoding = outputEncoding || encoding;
178-
179174
if (typeof data === 'string') {
180175
validateEncoding(data, inputEncoding);
181176
} else if (!isArrayBufferView(data)) {
@@ -195,7 +190,6 @@ Cipher.prototype.update = function update(data, inputEncoding, outputEncoding) {
195190

196191

197192
Cipher.prototype.final = function final(outputEncoding) {
198-
outputEncoding = outputEncoding || getDefaultEncoding();
199193
const ret = this[kHandle].final();
200194

201195
if (outputEncoding && outputEncoding !== 'buffer') {

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.