browserify / randombytes

random bytes from browserify stand alone
MIT License
99 stars 47 forks source link

Buffer in browser #11

Closed CMCDragonkai closed 1 year ago

CMCDragonkai commented 6 years ago

The browser.js uses safe-buffer package as the implementation of Buffer.

However safe-buffer doesn't supply a browser polyfill for buffer, it just uses the Node buffer.

So how is browser.js going to work in browsers?

Shouldn't it instead use the Buffer polyfill? https://github.com/feross/buffer

calvinmetcalf commented 6 years ago

this is meant to be used with browserify or webpack which provide those buffers

ghost commented 2 years ago

@calvinmetcalf Webpack 5 removed buffer so it should have a fallback https://github.com/webpack/changelog-v5/issues/10

dcousens commented 1 year ago

Duplicate of https://github.com/browserify/randombytes/issues/21