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

Add support for subtle (importKey,exportKey) (raw,jwk) (aes,ec,rsa) #233

Merged
merged 10 commits into from
Apr 12, 2024

Conversation

boorad
Copy link
Collaborator

@boorad boorad commented Feb 9, 2024

Add support for crypto.subtle API calls

  • importKey()
  • exportKey()

for formats:

  • raw
  • jwk

using algorithm families:

  • aes
  • ec
  • rsa

Fix JS/TS dependencies

Repair dependencies, devDependencies and peerDependencies, as @shamilovtim pointed out they were a bit messed up from #211.

Patch react-native-quick-base64

JWK required some base64url encoding, so a couple of PRs in react-native-quick-base64 were required. A side benefit of these changes is that the native base64 lib is now 4-6x faster.

Github Actions

Patch up and modernize Github Actions workflows

@boorad boorad changed the title Add support for subtle.import key() - JWK & AES Add support for subtle importKey() & exportKey() - raw, JWK for AES, EC, RSA Feb 14, 2024
@boorad boorad mentioned this pull request Feb 18, 2024
6 tasks
@mrousavy
Copy link
Member

Thanks for fixing all the new jsi::JSError invocations, that's a good catch!

@boorad boorad force-pushed the feat/subtle.importKey.AES-GCM branch 2 times, most recently from fbaa4ac to dfde3ed Compare March 26, 2024 15:04
@boorad boorad closed this Mar 26, 2024
@boorad boorad force-pushed the feat/subtle.importKey.AES-GCM branch from dfde3ed to 3700146 Compare March 26, 2024 15:05
@boorad boorad reopened this Mar 26, 2024
@boorad boorad changed the title Add support for subtle importKey() & exportKey() - raw, JWK for AES, EC, RSA Add support for subtle (importKey,exportKey) (raw,jwk) (aes,ec,rsa) Mar 27, 2024
@boorad boorad force-pushed the feat/subtle.importKey.AES-GCM branch from 9e466c6 to 33c4349 Compare March 30, 2024 02:51
@boorad boorad marked this pull request as ready for review April 11, 2024 13:37
@boorad
Copy link
Collaborator Author

boorad commented Apr 11, 2024

simulator_screenshot_3964714B-EBB9-4D6A-B9E0-D0668D5BDD32

Copy link
Member

@mrousavy mrousavy left a comment

Choose a reason for hiding this comment

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

incredible work @boorad.

as discussed over discord, let's merge this an create a beta on npm. If you spot any regressions please let me know :)

@mrousavy mrousavy merged commit a009d19 into margelo:main Apr 12, 2024
6 checks passed
@boorad boorad mentioned this pull request Apr 13, 2024
@boorad boorad self-assigned this Apr 13, 2024
@boorad boorad deleted the feat/subtle.importKey.AES-GCM branch April 13, 2024 01:17
@aziyatali
Copy link

@boorad Are these changes included in version 0.7.0-rc.0?

@aziyatali
Copy link

Just checked release notes and it is included, I was just hesitant to use this version

@boorad boorad mentioned this pull request May 6, 2024
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.

4 participants