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

Support for buffers #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

None yet

3 participants