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

refactor: replaced built-in crypto library with @web5/crypto #816

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Toheeb-Ojuolape
Copy link

@Toheeb-Ojuolape Toheeb-Ojuolape commented Oct 4, 2024

What type of PR is this? (check all applicable)

  • ♻️ Refactor
  • ✨ New Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 👷 Example Application
  • 🧑‍💻 Code Snippet
  • 🎨 Design
  • 📖 Content
  • 🧪 Tests
  • 🔖 Release
  • 🚩 Other

Description

This PR replaces the built-in crypto library with @web5/crypto in the encryption.ts file

Related Tickets & Documents

Resolves #672

Mobile & Desktop Screenshots/Recordings

Added code snippets?

  • 👍 yes
  • 🙅 no, because they aren't needed

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help
  • 🥺 I ran unit tests for encryption.ts file and it passed

[optional] Are there any post-deployment tasks we need to perform?

Please run npm install or make sure @web5/crypto package is installed before testing

[optional] What gif best describes this PR or how it makes you feel?

Demo GIF

@LiranCohen
Copy link
Member

Hi @Toheeb-Ojuolape! Thanks for this 🙏.

It seems like the tests are failing around encryption, please see:
https://github.com/TBD54566975/dwn-sdk-js/actions/runs/11186574275/job/31314960415?pr=816#step:9:1057

@Toheeb-Ojuolape
Copy link
Author

Hi @Toheeb-Ojuolape! Thanks for this 🙏.

It seems like the tests are failing around encryption, please see: https://github.com/TBD54566975/dwn-sdk-js/actions/runs/11186574275/job/31314960415?pr=816#step:9:1057

Hi @LiranCohen thanks for your message. I have refactored my code for encryption using web5/crypto and ran the failing npm run test:node command on my local and all tests passed. I think all should be well now. Looking forward to your feedback

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.

Replace built-in crypto library with @web5/crypto
2 participants