I'm already using bcrypt.hashSync() on the NodeJS server side (included with NPM), but I can't use it on the browser side: the 'bcrypt' object is undefined when I call it with:
<script src="node_modules/bcryptjs/dist/bcrypt.min.js"></script>
...
EnteredPassword = bcrypt.hashSync(pwd, 10);
After some research, the solution is very simple: you have to add a prefix "dcodeIO." before "bcrypt" :
<script src="node_modules/bcryptjs/dist/bcrypt.min.js"></script>
...
EnteredPassword = dcodeIO.bcrypt.hashSync(pwd, 10);
(or, as async...)
EnteredPassword = await dcodeIO.bcrypt.hash(pwd, 10);