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

334
Views
Conversion using Buffer is different from base64.fromArrayBuffer(). Why does that happen?

TempId looks like this: new Uint8Array([1, 252, 232, 40, 235, 180, 121, 67, 150, 7, 110, 99, 195, 156, 150, 82, 131, 163, 84, 209, 102, 76, 175, 209, 33, 104, 1, 251, 127, 70, 88, 178, 57, 216, 48, 202, 161, 248, 243, 170, 190, 126, 39, 111, 231, 116, 69, 133, 183, 59, 54, 1, 193, 110, 191, 48, 235, 14, 172, 162, 213, 181, 147, 83, 90])

Buffer.from(tempId).toString('base64'); returns this: AfzoKOu0eUOWB25jw5yWUoOjVNFmTK/RIWgB+39GWLI52DDKofjzqr5+J2/ndEWFtzs2AcFuvzDrDqyi1bWTU1o=

CredId looks like this:

new Uint8Array([1, 252, 232, 40, 235, 180, 121, 67, 150, 7, 110, 99, 195, 156, 150, 82, 131, 163, 84, 209, 102, 76, 175, 209, 33, 104, 1, 251, 127, 70, 88, 178, 57, 216, 48, 202, 161, 248, 243, 170, 190, 126, 39, 111, 231, 116, 69, 133, 183, 59, 54, 1, 193, 110, 191, 48, 235, 14, 172, 162, 213, 181, 147, 83, 90])

base64.fromArrayBuffer(credId, true); returns this:

AfzoKOu0eUOWB25jw5yWUoOjVNFmTK_RIWgB-39GWLI52DDKofjzqr5-J2_ndEWFtzs2AcFuvzDrDqyi1bWTU1o

As you can see, the token are very similar, but there are a couple of differences ('=' at the end, '/' instead of '_', and '-' instead of '+'. Why does that happen?

about 4 years ago · Juan Pablo Isaza
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!