Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

168
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda