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

360
Vistas
If I change my server bcrypt can remember salt and decrypt Password,How can do that?

I want to deploy my program to another server. Can my script decrypt all passwords of my customers in database correctly?

//old server
const bcrypt = require("bcrypt");
const salt = bcrypt.genSalt();
password = bcrypt.hash("password", salt);

//new server 
const auth = bcrypt.compare(password, "password")

How can BCrypt decrypt passwords with a variable salt that is generated randomly?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

BCrypt hashes are stored in one of two forms.

The more common is Modular Crypt Format and has the form...

$2y$10$kV7kssmFuFOydBewIp9ele8GMkWGDPpte6jGGDAabpsBmxtzWxfZW

Where:

  • $ is a delimiter
  • 2 indicates the algorithm is BCrypt
  • y is the version of BCrypt
  • 10 is the cost
  • kV7kssmFuFOydBewIp9ele is the salt
  • 8GMkWGDPpte6jGGDAabpsBmxtzWxfZW is the hash.

A more modern alternative is PHC string format which makes it more obvious which parts correspond to which values:

$bcrypt$v=98$r=10$cIF1Ev2ATA6/iYv4kddXCQ$qcrDoGjsiB2eLq1/vCZWiAZ8bEs4+Qs

In both cases, the string persisted to your database is completely portable and contains everything necessary to compare a candidate password: The hash, salt, cost, algorithm name, and algorithm version.

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