Bcrypt
·
Backend/Bcrypt
Bcrypt비밀번호를 해싱하거나 해시를 검증하는 라이브러리Npmnpm install bycrypthashconst bcrypt = require("bcrypt");const { User } = require("../model/user.js");app.post("/sign_up", async (req, res) => { const { email, password } = req.body; const saltRound = 10; const hashedPassword = await bcrypt.hash(password, saltRound); // 실무에서는 에러 처리가 필수 await User.create({ email, password: hashedPassword }); })Salt Round ..