Skip to content

Commit

Permalink
🐳 chore(utils): hash password
Browse files Browse the repository at this point in the history
  • Loading branch information
EvandroCalado committed Feb 21, 2024
1 parent eba49b7 commit 7cc5cee
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions utils/passwordUtils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import bcrypt from "bcryptjs";

export const hashPassword = async (password) => {
const salt = await bcrypt.genSalt(10);
const hashedPassword = await bcrypt.hash(password, salt);
return hashedPassword;
};

0 comments on commit 7cc5cee

Please sign in to comment.