The asynchronous version uses a thread pool that does not stop the main event loop. The synchronous approach will block the event loop and prevent your application from handling any other incoming requests or events. The asynchronous mode is recommended because hashing is a CPU-intensive task. Now, you can include it in your application: const bcrypt = require ( 'bcrypt' ) Hashing a passwordīcrypt provides both asynchronous and synchronous password hashing methods. To use the bcrypt library in a Node.js application, run the following command in your terminal to install it via NPM: $ npm install bcrypt -save The bcrypt library makes it fun to hash and compare passwords in a Node.js application. Node.js Password Hashing Tutorial Using Password-Hash Module
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |