Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

587
Vistas
How to use bcrypt hash on the browser side?

I'm already using bcrypt.hashSync() on the NodeJS server side (included with NPM), but I can't use it on the browser side: the 'bcrypt' object is undefined when I call it with:

    <script src="node_modules/bcryptjs/dist/bcrypt.min.js"></script>

    ...
    EnteredPassword = bcrypt.hashSync(pwd, 10);
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

After some research, the solution is very simple: you have to add a prefix "dcodeIO." before "bcrypt" :

    <script src="node_modules/bcryptjs/dist/bcrypt.min.js"></script>

    ...
    EnteredPassword = dcodeIO.bcrypt.hashSync(pwd, 10);

 (or, as async...)

    EnteredPassword = await dcodeIO.bcrypt.hash(pwd, 10);
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda