Skip to content

Commit 3c8037a

Browse files
tniessenruyadorno
authored andcommittedAug 22, 2022
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 7af55db commit 3c8037a

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
@@ -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)
Please sign in to comment.