mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
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 <duhamelantoine1995@gmail.com> Reviewed-By: Feng Yu <F3n67u@outlook.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
7a18ee8315
commit
7abbbf2ff3
@ -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');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user