Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
  • Loading branch information
tniessen committed Jul 25, 2022
commit d24207543e763709e7142fc4f228464910093386
4 changes: 2 additions & 2 deletions test/pummel/test-crypto-dh-hash.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ const hashes = {

for (const name in hashes) {
const group = crypto.getDiffieHellman(name);
const private_key = group.getPrime('hex');
const prime = group.getPrime('hex');
const hash1 = hashes[name];
const hash2 = crypto.createHash('sha1')
.update(private_key.toUpperCase()).digest('hex');
.update(prime.toUpperCase()).digest('hex');
assert.strictEqual(hash1, hash2);
assert.strictEqual(group.getGenerator('hex'), '02');
}