Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

298
Views
el cartero devuelve el código de estado 401 aunque mi hashpwd y mi pwd descifrada son idénticas
router.post("/login", async (req, res) => { try { const user = await User.findOne({ email: req.body.email }); if (!user) return res.status(401).json("Wrong Credentials!"); var salt = process.env.SALT; //SALT var hashedPassword = CryptoJS.PBKDF2(req.body.masterPassword, salt, { //HASHED PWD keySize: 256 / 32, }); const decryptedPassword = CryptoJS.AES.decrypt( user.masterPassword, process.env.PASS_SEC ).toString(); console.log(decryptedPassword+" "+hashedPassword) if (hashedPassword === decryptedPassword) { res.status(200).json(user); } else { res.status(401).json("pwd dont match!"); } } catch (err) { res.status(500).json(err); } });

console.log(decryptedPassword+" "+hashedPassword) devuelve 8da9d88c32a0246a66ed3a70b8e3a9c34d46112ebb3b2e891172e5773bfa80dd 8da9d88c32a0246a66ed3a70b8e3a9c34d2e57103b2e5703b2e570dd3b2

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!