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

269
Vistas
How to convert PHP MD5 in NodeJS

I couldn't find a concrete example for my problem

I need to convert this line PHP in NodeJS :

if (md5($value1.$value2.$value3.$value4.$value5) != $value)

I have used several things without success, like CryptoJS.HmacMD5, CryptoJS.MD5 or md5

I feel it's a bit more complex with NodeJS, the values ​​correspond to queries in the url that I retrieve with express, req.query.value_1 ...

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

0

Use crypto from NPM

npm i crypto
const crypto = require('crypto');
let strToMd5 = str1 + str2 + str4;
let hashedStr = crypto.createHash('md5').update(strToMd5).digest('hex');

if(hashedStr != value){
    // code
}
about 4 years ago · Juan Pablo Isaza Denunciar

0

This should work

const crypto = require('crypto');

const data = "value";
const hash = crypto.createHash('md5').update(data).digest("hex");

if (hash != "value") { }

PS: you don't need to install it as it already comes with Node

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