browserify / browserify/randombytes

Implement browser getRandomValues without depending on crypto

オープン
#37 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
question
主要言語
JavaScript
スター
102
フォーク
47
PR マージ指標
30日以内にマージされた PR はありません

説明

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?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。