browserify / browserify/randombytes
Implement browser getRandomValues without depending on crypto
- Langage dominant
- JavaScript
- Étoiles
- 102
- Forks
- 47
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
This is based on this [discussion](https://github.com/browserify/crypto-browserify/issues/232)
TL;DR: I propose having an implementation of `getRandomValues` that does not depend on a native implementation of crypto.
I am having an issue with bundling my code and running it in a non-browser environment, using modules that depend on `crypto`, which depends on `randombytes`' implementation of `getRandomValues`. If I bundle my code in "browser" mode, I get the error `'Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11'`.
If I don't bundle it in browser mode but force browser fallback for `crypto-browserify` (which is necessary in my use-case, the javascript VM I'm using does not implement `crypto`), then I get a circular dependency and getRandomBytes is never implemented.
Is it possible to implement it in this package? If not is there any particular reason? And can I help in some way?
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Start by reviewing this package's browser getRandomValues implementation and the linked crypto-browserify discussion. Trace how randombytes is selected in browser mode and how the crypto-browserify fallback creates the reported circular dependency. Done means a supported implementation works in the described non-browser JavaScript VM without relying on a native crypto implementation.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- cryptography
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100