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: fix misleading positional argument · nodejs/node@fd3fb0c

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
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,21 +112,21 @@ function getUIntOption(options, key) {
112112
return -1;
113113
}
114114

115-
function createCipherBase(cipher, credential, options, decipher, iv) {
115+
function createCipherBase(cipher, credential, options, isEncrypt, iv) {
116116
const authTagLength = getUIntOption(options, 'authTagLength');
117-
this[kHandle] = new CipherBase(decipher);
117+
this[kHandle] = new CipherBase(isEncrypt);
118118
this[kHandle].initiv(cipher, credential, iv, authTagLength);
119119
this._decoder = null;
120120

121121
ReflectApply(LazyTransform, this, [options]);
122122
}
123123

124-
function createCipherWithIV(cipher, key, options, decipher, iv) {
124+
function createCipherWithIV(cipher, key, options, isEncrypt, iv) {
125125
validateString(cipher, 'cipher');
126126
const encoding = getStringOption(options, 'encoding');
127127
key = prepareSecretKey(key, encoding);
128128
iv = iv === null ? null : getArrayBufferOrView(iv, 'iv');
129-
ReflectApply(createCipherBase, this, [cipher, key, options, decipher, iv]);
129+
ReflectApply(createCipherBase, this, [cipher, key, options, isEncrypt, iv]);
130130
}
131131

132132
// The Cipher class is part of the legacy Node.js crypto API. It exposes

0 commit comments

Comments
0 (0)
You are visitor 01402520 — 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.