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

Error: undefined is not a supported algorithm #83

Open
gricey432 opened this issue Dec 18, 2018 · 1 comment
Open

Error: undefined is not a supported algorithm #83

gricey432 opened this issue Dec 18, 2018 · 1 comment

Comments

@gricey432
Copy link

gricey432 commented Dec 18, 2018

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

@gricey432
Copy link
Author

Went to make a PR and noticed there's already #77

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant