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

Appearance settings

Commit 3c8037a

Browse filesBrowse files
tniessenruyadorno
authored andcommitted
test: change misleading variable name
The return value of getPrime() is not a private key in any way. Refs: nodejs/node-v0.x-archive#2638 PR-URL: #43990 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Feng Yu <F3n67u@outlook.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 7af55db commit 3c8037a
Copy full SHA for 3c8037a

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎test/pummel/test-crypto-dh-hash.js‎

Copy file name to clipboardExpand all lines: test/pummel/test-crypto-dh-hash.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ const hashes = {
5050

5151
for (const name in hashes) {
5252
const group = crypto.getDiffieHellman(name);
53-
const private_key = group.getPrime('hex');
53+
const prime = group.getPrime('hex');
5454
const hash1 = hashes[name];
5555
const hash2 = crypto.createHash('sha1')
56-
.update(private_key.toUpperCase()).digest('hex');
56+
.update(prime.toUpperCase()).digest('hex');
5757
assert.strictEqual(hash1, hash2);
5858
assert.strictEqual(group.getGenerator('hex'), '02');
5959
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.