How to hash string with md5 function in Node.js ?
Steps to use md5 function to hash the string:
Step 1: create an “app.js” file and initialize the project using npm.
Step 2: Install md5 and prompt npm packages using npm install.
npm install md5 npm install prompt
Step 3: Now let’s code the “app.js” file. We take the required string as input from the user then use the md5() function to generate its hash string.
Step 4: Run app.js file using below command: