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

65
Views
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 answers
Answer question

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