Reputation: 83
How can I install crypto from nodeJs and how to use it in Angular2? Is there some dependencies to inject in my project? (http://nodejs.org/api/crypto.html)
Upvotes: 0
Views: 564
Reputation: 135396
You can't take any node module and expect it to operate in the browser environment. Some modules work in both environments but crypto
is not one of those modules.
Maybe you should look into window.crypto for browser-based cryptography
Upvotes: 1