-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
crypto::Hash update method error output is missing Buffer
#25487
Comments
Thanks for the excellent bug report. Yes, that looks like a genuine oversight to me, pull request most welcome. |
(edit: or just |
Running |
Great point. I'm working on it. Thanks! |
Any idea why I'm getting this error during
Node version: both 10.10.0 and 8.12.0 |
thanks @bnoordhuis . I assumed this so I allowed myself to file a PR already. And indeed the checks passed. |
Fixes: #25487 PR-URL: #25533 Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
10.10.0
Linux amit-ThinkPad-X1-Carbon-6th 4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
crypto
The
Hash
class in thecrypto
module has anupdate
method which may receive{string | Buffer | TypedArray | DataView}
in thedata
argument.(https://github.com/nodejs/node/blob/master/doc/api/crypto.md#hashupdatedata-inputencoding)
The error message output if an invalid argument type is passed is missing
Buffer
.(https://github.com/nodejs/node/blob/master/lib/internal/crypto/hash.js#L65)
I believe this is a good first bug, and would like to fix it myself. AFAICT, a test should be added here:
https://github.com/nodejs/node/blob/master/test/parallel/test-crypto-hash.js
If this issue is verified, I just need a pointer to how to run the tests in
test/parallel
.The text was updated successfully, but these errors were encountered: