-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: remove var redeclarations in test-crypto-* #4981
Conversation
@@ -46,11 +46,11 @@ assert.throws(function() { | |||
}, 'not enough data'); | |||
|
|||
// Test HMAC | |||
var h1 = crypto.createHmac('sha1', 'Node') | |||
const hmacHash = crypto.createHmac('sha1', 'Node') | |||
.update('some data') | |||
.update('to hmac') | |||
.digest('hex'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A minor nit: the above 3 lines should probably be re-aligned with the .
on line 49.
Same goes for the other instances of this in this and the other changed files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, fixed the alignment of all the .
characters. PTAL
Some minor nits and a question, but otherwise LGTM if CI is ok with it. |
40898af
to
46b5e3e
Compare
Missed one so I rebased and added it. PTAL |
// FIPS does not support MD5. | ||
if (common.hasFipsCrypto && hash == 'md5') | ||
continue; | ||
var result = crypto.createHmac(hash, wikipedia[i]['key']) | ||
const result = crypto.createHmac(hash, wikipedia[i]['key']) | ||
.update(wikipedia[i]['data']) | ||
.digest('hex'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one was missed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops! Thanks. Fixed it!
LGTM if CI is happy: https://ci.nodejs.org/job/node-test-pull-request/1453/ |
LGTM |
PR-URL: #4981 Reviewed-By: Brian White <[email protected]> Reviewed-By: James M Snell <[email protected]>
Squashed and landed in 2c97bd4 |
PR-URL: #4981 Reviewed-By: Brian White <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #4981 Reviewed-By: Brian White <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #4981 Reviewed-By: Brian White <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #4981 Reviewed-By: Brian White <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#4981 Reviewed-By: Brian White <[email protected]> Reviewed-By: James M Snell <[email protected]>
No description provided.