Hello I am trying to implement encryption in my application. I am using angular (angular-4) for the frontend and node js for the backend. Communication is done through socke
What you can do if you want to stay with the very good node-rsa library it to eject ng-cli from your project and configure webpack to automatically polyfill the nodejs crypto module with the crypto-browserify library.
First, eject ng-cli from your project (you will need to run yarn build or npm run build to build your project and you won't be able anymore to use ng build) :
ng eject
Then you need to add this data to the webpack.config.js file created by the ejection process :
"node": {
...
"crypto": true,
...
}
This will tell webpack to polyfill the crypto module.
I will soon dive into how to keep ng-cli and have a correct polyfilling behavior...