Sébastien
Sébastien

Reputation: 83

Crypto from nodeJs to Angular2

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

Answers (1)

Mulan
Mulan

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

Related Questions