So I have this Angular 5 application which uses aes256
library from NPM for encrypting password for login form. Inside that aes256
library, theres var crypto = require('crypto')
. When I run my application and try the login form, I encountered crypto.createHash is not a function
error.
When I debugged my app to find out whats wrong, I see that var crypto
was just an empty object.
crypto.createHash is not a function
crypto - empty object
You cannot use crypto module in angular application nor aes256 since it is build on crypto module. crypto module is a node native module you can't use any node native module from nodejs in angular application as it is running on the browser. Checkout some fronted encryption libraries here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With