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

71
Vistas
Generate fixed length unique string from 2

I have two numbers 919572562474827787 and 359678229096955904

I need to generate a unique string with fixed length so I can regenerate it again and get the same value. How can I do it?

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

0

You can do this with built-in functions from SubtleCrypto.

This function will return a cryptographically secure SHA-256 hash of the numbers. This will work independent of the system you run this with, and return the same output for the same input.

const hash = async (number1, number2) => btoa(String.fromCharCode.apply(null, new Uint8Array(await crypto.subtle.digest("SHA-256", new TextEncoder().encode(number1+number2)))))

hash("919572562474827787","359678229096955904").then(console.log)

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