| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM but two small changes needed before this lands
Sorry, something went wrong.
| { | ||
| const Hash = crypto.Hash; | ||
| const instance = crypto.Hash('sha256'); | ||
| assert(instance instanceof Hash, 'Hash is expected to return a new instance' + |
There was a problem hiding this comment.
needs a space either at the end of this line (after instance) or on the next line. Right now it says "instancewhen".
Sorry, something went wrong.
There was a problem hiding this comment.
Ah, Sorry. I'll update it soon.
Sorry, something went wrong.
| { | ||
| const Hmac = crypto.Hmac; | ||
| const instance = crypto.Hmac('sha256', 'Node'); | ||
| assert(instance instanceof Hmac, 'Hmac is expected to return a new instance' + |
There was a problem hiding this comment.
Same as above.
Sorry, something went wrong.
Right now it says "instance when".
There was a problem hiding this comment.
LGTM once changes from @apapirovski are incorporated
Sorry, something went wrong.
|
Same deal as #17458 (comment), are we able to use the create functions here? |
Sorry, something went wrong.
There was a problem hiding this comment.
Two quick nits, then LGTM
Sorry, something went wrong.
|
|
||
| { | ||
| const Hmac = crypto.Hmac; | ||
| const instance = crypto.Hmac('sha256', 'Node'); |
There was a problem hiding this comment.
createHmac
Sorry, something went wrong.
|
|
||
| { | ||
| const Hash = crypto.Hash; | ||
| const instance = crypto.Hash('sha256'); |
There was a problem hiding this comment.
createHash
Sorry, something went wrong.
There was a problem hiding this comment.
Same adobe #17458 (comment)
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM with @apapirovski comments addressed
Sorry, something went wrong.
Sorry, something went wrong.
|
@apapirovski Can you confirm your comments were addressed? |
Sorry, something went wrong.
|
Yes and I'm currently landing this |
Sorry, something went wrong.
Sorry, something went wrong.
crypto.Hash - Call constructor without new keyword crypto.Hmac - Call constructor without new keyword - Call constructor with typeof hmac != string - Call constructor with typeof hmac = string, typeof key != string PR-URL: #17447 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
crypto.Hash - Call constructor without new keyword crypto.Hmac - Call constructor without new keyword - Call constructor with typeof hmac != string - Call constructor with typeof hmac = string, typeof key != string PR-URL: #17447 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
crypto.Hash - Call constructor without new keyword crypto.Hmac - Call constructor without new keyword - Call constructor with typeof hmac != string - Call constructor with typeof hmac = string, typeof key != string PR-URL: #17447 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
| Back | FazBrowse Home | New Git URL |
Added these case
crypto.Hash
crypto.Hmac
Current coverage is here: https://coverage.nodejs.org/coverage-06e1b0386196f8f8/root/internal/crypto/hash.js.html
I cannot write test case: this._handle.update returns false in Hash#verify.
Because I don't know how to make mdctx_ to nullptr in Hash::HashUpdate.
See also:
Checklist
Affected core subsystem(s)
test