Skip to content
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

fix(utils): synchronous version of sha256 digest #1253

Merged
merged 2 commits into from
Sep 22, 2023
Merged

Conversation

simonas-notcat
Copy link
Contributor

What issue is this PR fixing

Native browser crypto API is async
We need a sync version of sha256 for the computeEntryHash method.

https://stackoverflow.com/a/73600052

Quality

Check all that apply:

  • I want these changes to be integrated
  • I successfully ran pnpm i, pnpm build, pnpm test, pnpm test:browser locally.
  • I allow my PR to be updated by the reviewers (to speed up the review process).
  • I added unit tests.
  • I added integration tests.
  • I did not add automated tests because _________, and I am aware that a PR without tests will likely get rejected.

Details

If applicable, add screen captures, error messages or stack traces to help explain your problem.

@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01% ⚠️

Comparison is base (e2e794f) 84.93% compared to head (5396c5e) 84.93%.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #1253      +/-   ##
==========================================
- Coverage   84.93%   84.93%   -0.01%     
==========================================
  Files         167      167              
  Lines       18132    18131       -1     
  Branches     2036     2036              
==========================================
- Hits        15400    15399       -1     
  Misses       2732     2732              
Files Changed Coverage Δ
packages/utils/src/credential-utils.ts 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@mirceanis mirceanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

If we decide to revert the CID stuff (#1239), we'll have to revert this PR too.

@mirceanis mirceanis merged commit 2e3972c into next Sep 22, 2023
@mirceanis mirceanis deleted the feat/sync-sha256 branch September 22, 2023 15:00
@mirceanis mirceanis changed the title feat: synchronous version of sha256 digest fix(utils): synchronous version of sha256 digest Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants