Password Hashing with MD5 module in Node.js Last Updated : 27 Apr, 2020 Comments Improve Suggest changes Like Article Like Report MD5 module in node.js uses a message-digest algorithm and it is a widely used hash function producing a 128-bit hash value. Password hashing is an important concept because, in the database, the actual password should not be stored as its a bad practice and also make the system less secure, so the password is stored in hashed form into the database which makes the system more secured. Introduction: It's easy to get started and easy to use. It is widely used and popular module for hashing password. It produces a 128-bit hash value. Installation of MD5 module: You can visit the link Install MD5 module. You can install this package by using the following command. npm install md5 After installing multer you can check your md5 version in command prompt using the command. npm version md5 After that, you can create a folder and add a file for example index.js, To run this file you need to run the following command. node index.js Requiring module: You need to include md5 module in your file by using these lines. var md5 = require('md5'); Filename: index.js javascript const md5 = require('md5') var password = 'geeks123' console.log('Normal password : ', password) console.log('Hashed password : ', md5(password)) Steps to run the program: The project structure will look like this: Make sure you have install md5 module using following commands: npm install md5 Run index.js file using below command: node index.js So this is how you can hash password in node js using MD5 module. There are other modules in the market for hashing like Bcrypt, Crypto, etc. Comment More infoAdvertise with us Next Article Must Do Coding Questions - Topic-wise G gouravhammad Follow Improve Article Tags : Node.js Node.js-Misc Similar Reads Interview PreparationInterview Preparation For Software DevelopersMust Coding Questions - Company-wise Must Do Coding Questions - Topic-wiseCompany-wise Practice ProblemsCompany PreparationCompetitive ProgrammingSoftware Design-PatternsCompany-wise Interview ExperienceExperienced - Interview ExperiencesInternship - Interview ExperiencesPractice @GeeksforgeeksProblem of the DayTopic-wise PracticeDifficulty Level - SchoolDifficulty Level - BasicDifficulty Level - EasyDifficulty Level - MediumDifficulty Level - HardLeaderboard !!Explore More...Data StructuresArraysLinked ListStackQueueBinary TreeBinary Search TreeHeapHashingGraphAdvance Data StructuresMatrixStringAll Data StructuresAlgorithmsAnalysis of AlgorithmsSearching AlgorithmsSorting AlgorithmsPattern SearchingGeometric AlgorithmsMathematical AlgorithmsRandomized AlgorithmsGreedy AlgorithmsDynamic ProgrammingDivide & ConquerBacktrackingBranch & BoundAll AlgorithmsProgramming LanguagesCC++JavaPythonC#Go LangSQLPHPScalaPerlKotlinWeb TechnologiesHTMLCSSJavaScriptBootstrapTailwind CSSAngularJSReactJSjQueryNodeJSPHPWeb DesignWeb BrowserFile FormatsComputer Science SubjectsOperating SystemsDBMSComputer NetworkComputer Organization & ArchitectureTOCCompiler DesignDigital Elec. & Logic DesignSoftware EngineeringEngineering MathematicsData Science & MLComplete Data Science CourseData Science TutorialMachine Learning TutorialDeep Learning TutorialNLP TutorialMachine Learning ProjectsData Analysis TutorialTutorial LibraryPython TutorialDjango TutorialPandas TutorialKivy TutorialTkinter TutorialOpenCV TutorialSelenium TutorialGATE CSGATE CS NotesGate CornerPrevious Year GATE PapersLast Minute Notes (LMNs)Important Topic For GATE CSGATE CoursePrevious Year Paper: CS exams Like