login about faq


A couple of years ago we built a VB6 activeX component utilizing RSA encryption. Unfortunately for my dev team, IE is discontinuing support for ActiveX ;) And we need to rewrite this old code into something new.

Nowadays .Net has built in native Crypto libs and I'd prefer to use those over 3rd party components. We're stuck with converting the RSA key as I'm unsure how to interpret the Exponent part of the RSA key.

most of the RSA properties are base64 encoded and aren't a problem However the RSA key has this section: <exponent>xyz</exponent> how can we convert this xyz in the proper byte array which the .net RSAParameters.Exponent needs?

many thanks!


asked Oct 12 '15 at 11:40

Bert%20Faes's gravatar image

Bert Faes

OK was able to figure it out

p.Exponent = Encoding.UTF8.GetBytes(doc.GetElementsByTagName("Exponent")[0].InnerText);


answered Oct 12 '15 at 12:40

Bert%20Faes's gravatar image

Bert Faes

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Oct 12 '15 at 11:40

Seen: 1,444 times

Last updated: Oct 12 '15 at 12:40

powered by OSQA