Skip to content

Commit e009a35

Browse files
tniessenjuanarbol
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 <[email protected]> Reviewed-By: Feng Yu <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 21a29d4 commit e009a35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ const hashes = {
4545

4646
for (const name in hashes) {
4747
const group = crypto.getDiffieHellman(name);
48-
const private_key = group.getPrime('hex');
48+
const prime = group.getPrime('hex');
4949
const hash1 = hashes[name];
5050
const hash2 = crypto.createHash('sha1')
51-
.update(private_key.toUpperCase()).digest('hex');
51+
.update(prime.toUpperCase()).digest('hex');
5252
assert.strictEqual(hash1, hash2);
5353
assert.strictEqual(group.getGenerator('hex'), '02');
5454
}

0 commit comments

Comments
 (0)