Skip to content

Conversation

@frelibert
Copy link

This change makes browserify-rsa run in a browser, clientside, which is mainly the purpose of having a browserify module.
browserify-rsa depends on Buffer, which is part of Node js API, only available serverside and therefore not available when running in the browser.
This can be fixed by adding 'safe-buffer' as dependency and following require statement.

var Buffer = require('safe-buffer').Buffer

This was added to the index.js script, in the same way as allready set in browserify-aes and others.

@ljharb ljharb merged commit 28d2560 into browserify:master Sep 26, 2024
331 checks passed
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.

2 participants