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

Bull 44449 pass hash as string #9

Merged
merged 9 commits into from
Dec 13, 2024
Merged

Conversation

dominictobias
Copy link
Collaborator

@dominictobias dominictobias commented Dec 12, 2024

Change how subtle is imported

crypto.subtle officially points to crypto.webcrypto.subtle and makes it easier to alias the "crypto" module in react-native since window.crypyo.subtle / globalThis.crypto.subtle / require("crypto").subtle all work on the same key path. Tested & confirmed it works.

hash: string instead of hash: { name: string }

Hash can be passed as a string or as { name: string }, but there is no purpose to the latter.

https://github.com/margelo/react-native-quick-crypto/ for React Native only supports the string version (raised issue: margelo/react-native-quick-crypto#557) and that library is the only one which supports SubtleCrypto for RN

So this change is for compatibility with React Native.

@dominictobias dominictobias merged commit e4ec111 into main Dec 13, 2024
@dominictobias dominictobias deleted the BULL-44449-pass-hash-as-string branch December 13, 2024 01:19
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.

2 participants