From 107864c0742e89885c830081a9528ee70b0cdb92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Tue, 26 Jul 2022 10:51:42 +0200 Subject: [PATCH] test: change misleading variable name The return value of getPrime() is not a private key in any way. Refs: https://github.com/nodejs/node-v0.x-archive/pull/2638 PR-URL: https://github.com/nodejs/node/pull/43990 Reviewed-By: Antoine du Hamel Reviewed-By: Feng Yu Reviewed-By: Luigi Pinca --- test/pummel/test-crypto-dh-hash.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/pummel/test-crypto-dh-hash.js b/test/pummel/test-crypto-dh-hash.js index 4e71eb961cf6da..ef5a640688c9bb 100644 --- a/test/pummel/test-crypto-dh-hash.js +++ b/test/pummel/test-crypto-dh-hash.js @@ -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'); }