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

167
Views
RSA key conversion from Uint8Array to BigInteger with node-rsa

I have a generated RSA key in the format of Uint8Array but I need the key in the format of BigInteger. See images below. How can I achieve such a conversion?

enter image description here

enter image description here

I use the node RSA lib: https://www.npmjs.com/package/node-rsa

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

0

I am guessing that the ‘generated’ key was obtained by invoking the exportKey method, using the ‘components’ format. With this setting, this method returns a fixed-structure object whose values are Buffers holding individual key components; it also appears that you have installed some kind of shim that simulates the node.js Buffer API with the Uint8Array object that browsers provide.

If that is so, then it all it should take to get the key object back is to invoke the importKey method:

const key = new NodeRSA();
key.importKey(keyData, 'components');
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!