Skip to content
This repository was archived by the owner on Feb 25, 2019. It is now read-only.
This repository was archived by the owner on Feb 25, 2019. It is now read-only.

Error: undefined is not a supported algorithm #83

Open
@gricey432

Description

@gricey432

When executing the example for subtle.digest from the Mozilla web docs I get

Error: undefined is not a supported algorithm
    at SHA.digest (-----/node_modules/@trust/webcrypto/src/algorithms/SHA.js:69:13)

It looks like SHA.js is expecting algorithm to be an object rather than a string.

If I change the digest entry function to pass in normalizedAlgorithm instead of algorithm it works in this case, but that doesn't seem like the right argument.

The MDN docs say the algo argument should be a string, so I'm not sure who's right here.

Edit: confirmed both the string and object work on Chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions