Skip to content

Commit f6a7019

Browse files
tniessendanielleadams
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 51db352 commit f6a7019

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ const hashes = {
5050

5151
for(constnameinhashes){
5252
constgroup=crypto.getDiffieHellman(name);
53-
constprivate_key=group.getPrime('hex');
53+
constprime=group.getPrime('hex');
5454
consthash1=hashes[name];
5555
consthash2=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)