Skip to content

feat: remove quick-crypto dependency#23

Merged
washluis-alencar merged 3 commits intomasterfrom
switch-crypto-lib-jwe
Jul 28, 2025
Merged

feat: remove quick-crypto dependency#23
washluis-alencar merged 3 commits intomasterfrom
switch-crypto-lib-jwe

Conversation

@washluis-alencar
Copy link
Copy Markdown
Contributor

Description

Testing required outside of automated testing?

  • Not Applicable

Screenshots (if appropriate):

  • Not Applicable

Rollback / Rollforward Procedure

  • Roll Forward
  • Roll Back

Reviewer Checklist

  • Description of Change
  • Description of outside testing if applicable.
  • Description of Roll Forward / Backward Procedure
  • Documentation updated for Change

@washluis-alencar washluis-alencar requested a review from a team as a code owner July 28, 2025 19:25
@washluis-alencar washluis-alencar changed the title feat: remove quick-crypto lib feat: remove quick-crypto dependency Jul 28, 2025
Comment on lines +30 to +39
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { getRandomValues } = require('react-native-get-random-values');

// Create minimal crypto object - @noble libraries only need getRandomValues
const minimalCrypto: MinimalCrypto = {
getRandomValues: getRandomValues,
subtle: undefined,
};

globalThis.crypto = minimalCrypto as typeof globalThis.crypto;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The lib is already a polyfill so no need for all this, in theory you can just import it in the entrypoint of the lib:

https://www.npmjs.com/package/react-native-get-random-values#usage

@washluis-alencar washluis-alencar merged commit 98ac9ac into master Jul 28, 2025
4 checks passed
@washluis-alencar washluis-alencar deleted the switch-crypto-lib-jwe branch July 28, 2025 19:37
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