Password hashing with bcrypt in Node.js
📖 Scenario: You are building a simple user registration system. To keep user passwords safe, you need to hash them before saving.
🎯 Goal: Create a Node.js script that uses bcrypt to hash a plain password securely.
📋 What You'll Learn
Create a variable with the plain password string exactly as specified
Set a salt rounds variable for bcrypt configuration
Use bcrypt to hash the password with the salt rounds
Export or log the hashed password variable
💡 Why This Matters
🌍 Real World
Password hashing is essential for protecting user credentials in web applications to prevent password theft.
💼 Career
Understanding bcrypt hashing is a key skill for backend developers working on authentication and security.
Progress0 / 4 steps