Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Case-sensitive algorithm argument in crypto.createVerify() #5031

Copy link
Copy link
@jhermsmeier

Description

@jhermsmeier
Issue body actions

Contrary to what can be seen & read in the documentation,

const verify = crypto.createVerify('rsa-sha256');

crypto.createVerify() throws if the algorithm argument is lowercase:

crypto.js:295
  this._handle.init(algorithm);
               ^

Error: Unknown message digest
    at Error (native)
    at new Verify (crypto.js:295:16)
    at Object.Verify (crypto.js:292:12)

It works perfectly fine if the algorithm is uppercased. Is this intended behavior (and the documentation just needs updating) or is this indeed a minor bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    cryptoIssues and PRs related to the crypto subsystem.Issues and PRs related to the crypto subsystem.docIssues and PRs related to the documentations.Issues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.