Skip to content

crypto::Hash update method error output is missing Buffer #25487

@amitzur

Description

@amitzur
  • Version: 10.10.0
  • Platform: 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
  • Subsystem: crypto

The Hash class in the crypto module has an update method which may receive {string | Buffer | TypedArray | DataView} in the data 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.cryptoIssues and PRs related to the crypto subsystem.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions