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

67
Views
Genera una cadena única de longitud fija a partir de 2

Tengo dos números 919572562474827787 y 359678229096955904

Necesito generar una cadena única con una longitud fija para poder regenerarla nuevamente y obtener el mismo valor. ¿Cómo puedo hacerlo?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede hacer esto con las funciones integradas de SubtleCrypto .

Esta función devolverá un hash SHA-256 criptográficamente seguro de los números. Esto funcionará independientemente del sistema con el que lo ejecute y devolverá la misma salida para la misma entrada.

 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 Report
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!