Skip to content

A sample Jobs API project (work in progress now) using Mongo, Express and Node.

Notifications You must be signed in to change notification settings

JAYARAJ2014/jobs-api

Repository files navigation

Jobs API

Hashing

///A cryptographic salt is made up of random bits added to each password instance before its hashing
///Salts create unique passwords even in the instance of two users choosing the same passwords.
///Salts help us mitigate hash table attacks by forcing attackers to re-compute them using the salts for each user.

//Bigger the number, more random bits, more secured.
// More rounds = > more processing power. 

    const salt = await bcrypt.genSalt(10)
    
    const hashedPassword = await bcrypt.hash(password,salt)
    const tempUser = {username, email, password: hashedPassword}
    const user = await User.create({ ...tempUser });

Releases

No releases published

Packages

No packages published