Skip to content

Conversation

@smulikHakipod
Copy link

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@okuryu
Copy link
Collaborator

okuryu commented Oct 1, 2019

Buffer is implemented only for Node.js. I think supporting TypedArray is better.

@jimmywarting
Copy link

Buffer is implemented only for Node.js. I think supporting TypedArray is better.

Agree! disapprove of this PR

Speaking of... the package randombytes uses safe-buffer which brings in Buffer into the browser anyway? Could you use a version that don't depend on it?
Simply use Uint8Array + crypto.getRandomValues instead?

...or if it isn't super critical to be hyper uniq maybe Math.random is sufficient?

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